[ldns-users] oxffffffff in dns records cause a syntax error in ldns-read-zone

Robert Edmonds edmonds at debian.org
Tue Jan 11 19:31:11 UTC 2011


Miek Gieben wrote:
>  287         len = strlen((char*)str);
>  288         /* octet representation can make strings a lot longer than actual length */
>  289         if (len > LDNS_MAX_DOMAINLEN * 4) {
>  290                 return LDNS_STATUS_DOMAINNAME_OVERFLOW;
>  291         }

ldns/rr.h:#define LDNS_MAX_DOMAINLEN    255

255 * 4 is 1020.

from libbind <arpa/nameser.h>,

#define NS_MAXDNAME     1025    /*%< maximum domain name (presentation format)*/

i don't recall off-hand the math to come up with the 1025 value...

-- 
Robert Edmonds
edmonds at debian.org



More information about the ldns-users mailing list