]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
deal with embedded \r in labels - sadly, closing ticket 162
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 22 Mar 2008 16:14:38 +0000 (16:14 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 22 Mar 2008 16:14:38 +0000 (16:14 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1167 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/rcpgenerator.cc

index 4904f184de9aa660843a427b3ad3d839378a664d..979f5d327c396dd2283fccd7e63f873494681469 100644 (file)
@@ -62,8 +62,6 @@ void RecordTextReader::xfr32BitInt(uint32_t &val)
   d_pos = endptr - d_string.c_str();
 }
 
-
-
 void RecordTextReader::xfrTime(uint32_t &val)
 {
   struct tm tm;
@@ -156,7 +154,7 @@ void RecordTextReader::xfrLabel(string& val, bool)
 
   const char* strptr=d_string.c_str();
   while(d_pos < d_end) {
-    if(dns_isspace(strptr[d_pos]))
+    if(strptr[d_pos]!='\r' && dns_isspace(strptr[d_pos]))
       break;
 
     if(strptr[d_pos]=='\\' && d_pos < d_end - 1 && strptr[d_pos+1]!='.')  // leave the \. escape around