From: W.C.A. Wijngaards Date: Wed, 16 Mar 2022 08:54:53 +0000 (+0100) Subject: - Fix to ensure uniform handling of spaces and tabs when parsing RRs. X-Git-Tag: release-1.16.0rc1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=402135b41ae326923136a8f9e087c17ddabc911b;p=thirdparty%2Funbound.git - Fix to ensure uniform handling of spaces and tabs when parsing RRs. --- diff --git a/doc/Changelog b/doc/Changelog index 93e452775..8b885b83c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +16 March 2022: Wouter + - Fix to ensure uniform handling of spaces and tabs when parsing RRs. + 9 March 2022: Wouter - Merge #644: Make `install-lib` make target install the pkg-config file. diff --git a/sldns/str2wire.c b/sldns/str2wire.c index 09dedb0d7..5cfd3c585 100644 --- a/sldns/str2wire.c +++ b/sldns/str2wire.c @@ -378,7 +378,8 @@ rrinternal_get_quoted(sldns_buffer* strbuf, const char** delimiters, /* skip spaces */ while(sldns_buffer_remaining(strbuf) > 0 && - *(sldns_buffer_current(strbuf)) == ' ') { + (*(sldns_buffer_current(strbuf)) == ' ' || + *(sldns_buffer_current(strbuf)) == '\t')) { sldns_buffer_skip(strbuf, 1); } @@ -780,7 +781,8 @@ rrinternal_parse_rdata(sldns_buffer* strbuf, char* token, size_t token_len, /* unknown RR data */ if(token_strlen>=2 && strncmp(token, "\\#", 2) == 0 && - !quoted && (token_strlen == 2 || token[2]==' ')) { + !quoted && (token_strlen == 2 || token[2]==' ' || + token[2]=='\t')) { was_unknown_rr_format = 1; if((status=rrinternal_parse_unknown(strbuf, token, token_len, rr, rr_len, &rr_cur_len,