]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
zero label length (for root label) was not copied in str2rdf_dname
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Tue, 1 Feb 2005 15:30:23 +0000 (15:30 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Tue, 1 Feb 2005 15:30:23 +0000 (15:30 +0000)
str2host.c

index 2dab0283fb731b7da52aac4172d2aaf7de98bede..c95618c16fb80873bb7284a5ae454ae9731f3970 100644 (file)
@@ -194,7 +194,8 @@ ldns_str2rdf_dname(ldns_rdf **d, const uint8_t* str)
        *q = (uint8_t*)'\00'; /* end the string */
 
        /* s - buf_str works because no magic is done * in the above for-loop */
-       *d = ldns_rdf_new_frm_data((s - buf_str + 1) , LDNS_RDF_TYPE_DNAME , buf); 
+       *d = ldns_rdf_new_frm_data((s - buf_str + 2) , LDNS_RDF_TYPE_DNAME , buf); 
+
        return LDNS_STATUS_OK;
 }