From: Jelte Jansen Date: Tue, 1 Feb 2005 15:30:23 +0000 (+0000) Subject: zero label length (for root label) was not copied in str2rdf_dname X-Git-Tag: release-0.50~480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=116ac63ba8208fc61bc8f9574f63a24486e6da73;p=thirdparty%2Fldns.git zero label length (for root label) was not copied in str2rdf_dname --- diff --git a/str2host.c b/str2host.c index 2dab0283..c95618c1 100644 --- a/str2host.c +++ b/str2host.c @@ -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; }