From 8803df157f788cec99fd403ccbffff713aa169d3 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Mon, 27 Dec 2021 14:38:54 +0100 Subject: [PATCH] Comment explaining how empty long strings are represented in rdfs In response to issue #150 --- str2host.c | 3 +++ 1 file changed, 3 insertions(+) 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 { -- 2.47.3