From: Bert Hubert Date: Sat, 22 Mar 2008 16:14:38 +0000 (+0000) Subject: deal with embedded \r in labels - sadly, closing ticket 162 X-Git-Tag: rec-3.1.7.1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a1825d6835dbefe64be0e14b10b791c200f8ee1;p=thirdparty%2Fpdns.git deal with embedded \r in labels - sadly, closing ticket 162 git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1167 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/rcpgenerator.cc b/pdns/rcpgenerator.cc index 4904f184de..979f5d327c 100644 --- a/pdns/rcpgenerator.cc +++ b/pdns/rcpgenerator.cc @@ -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