Changeset 1166

Show
Ignore:
Timestamp:
03/22/08 17:03:15 (7 months ago)
Author:
ahu
Message:

properly convey empty TXT strings (why??) through the recursor, closing ticket 178

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pdns/pdns/dnsparser.cc

    r1155 r1166  
    401401     
    402402    ret.append(1,'"'); 
    403     string val(&d_content.at(d_pos), &d_content.at(d_pos+labellen-1)+1); 
    404      
    405     ret.append(txtEscape(val)); // the end is one beyond the packet 
     403    if(labellen) { // no need to do anything for an empty string 
     404      string val(&d_content.at(d_pos), &d_content.at(d_pos+labellen-1)+1); 
     405      ret.append(txtEscape(val)); // the end is one beyond the packet 
     406    } 
    406407    ret.append(1,'"'); 
    407408    d_pos+=labellen;