- Fix escape more characters when printing an RR type with an unquoted

string.
This commit is contained in:
W.C.A. Wijngaards 2025-04-01 13:53:29 +02:00
parent 0ca76b05e0
commit 17f95ffac1
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
1 April 2025: Wouter
- Fix escape more characters when printing an RR type with an unquoted
string.
31 March 2025: Wouter
- iana portlist update.
- Merge #1042: Fast Reload. The unbound-control fast_reload is added.

View file

@ -2059,7 +2059,8 @@ int sldns_wire2str_unquoted_scan(uint8_t** d, size_t* dl, char** s, size_t* sl)
(*d)++;
(*dl)--;
for(i=0; i<len; i++) {
if(isspace((unsigned char)(*d)[i]))
if(isspace((unsigned char)(*d)[i]) || (*d)[i] == '(' ||
(*d)[i] == ')' || (*d)[i] == '\'')
w += sldns_str_print(s, sl, "\\%c", (char)(*d)[i]);
else w += str_char_print(s, sl, (*d)[i]);
}