]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Comment explaining how empty long strings are represented in rdfs
authorWillem Toorop <willem@nlnetlabs.nl>
Mon, 27 Dec 2021 13:38:54 +0000 (14:38 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Mon, 27 Dec 2021 13:41:31 +0000 (14:41 +0100)
In response to issue #150

str2host.c

index ea2fe73a06ca4c9aae8f5c2fc5f1c73fd6445606..b33101b0b8d38d4f53e9457c191972d4f6769156 100644 (file)
@@ -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 {