From: Willem Toorop Date: Mon, 27 Dec 2021 13:38:54 +0000 (+0100) Subject: Comment explaining how empty long strings are represented in rdfs X-Git-Tag: 1.8.2-rc.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8803df157f788cec99fd403ccbffff713aa169d3;p=thirdparty%2Fldns.git Comment explaining how empty long strings are represented in rdfs In response to issue #150 --- diff --git a/str2host.c b/str2host.c index ea2fe73a..b33101b0 100644 --- a/str2host.c +++ b/str2host.c @@ -1550,6 +1550,9 @@ ldns_str2rdf_long_str(ldns_rdf **rd, const char *str) return LDNS_STATUS_SYNTAX_BAD_ESCAPE; } if (!(length = (size_t)(dp - data))) { + /* An empty string is a data buffer of 0 bytes. The rdf for + * this long string has to have length 0 and point to NULL. + */ LDNS_FREE(data); data = NULL; } else {