mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix to whitespace in dname_str.
This commit is contained in:
parent
3ec5d78ac9
commit
752a3f7f52
2 changed files with 7 additions and 6 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
for the fix.
|
for the fix.
|
||||||
- Fix that edns-subnet failure to create a subquery errors as
|
- Fix that edns-subnet failure to create a subquery errors as
|
||||||
servfail, and not formerror.
|
servfail, and not formerror.
|
||||||
|
- Fix to whitespace in dname_str.
|
||||||
|
|
||||||
6 August 2025: Wouter
|
6 August 2025: Wouter
|
||||||
- Fix edns subnet, so that the subquery without subnet is stored in
|
- Fix edns subnet, so that the subquery without subnet is stored in
|
||||||
|
|
|
||||||
|
|
@ -650,11 +650,11 @@ void dname_str(uint8_t* dname, char* str)
|
||||||
while(lablen) {
|
while(lablen) {
|
||||||
len += lablen+1;
|
len += lablen+1;
|
||||||
if(len >= LDNS_MAX_DOMAINLEN) {
|
if(len >= LDNS_MAX_DOMAINLEN) {
|
||||||
if ((s-str) >= (LDNS_MAX_DOMAINLEN-1))
|
if ((s-str) >= (LDNS_MAX_DOMAINLEN-1))
|
||||||
s = str + LDNS_MAX_DOMAINLEN - 2;
|
s = str + LDNS_MAX_DOMAINLEN - 2;
|
||||||
*s++ = '&';
|
*s++ = '&';
|
||||||
*s = 0;
|
*s = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(lablen > LDNS_MAX_LABELLEN) {
|
if(lablen > LDNS_MAX_LABELLEN) {
|
||||||
*s++ = '#';
|
*s++ = '#';
|
||||||
|
|
@ -666,7 +666,7 @@ void dname_str(uint8_t* dname, char* str)
|
||||||
|| *dname == '-' || *dname == '_'
|
|| *dname == '-' || *dname == '_'
|
||||||
|| *dname == '*')
|
|| *dname == '*')
|
||||||
*s++ = *(char*)dname++;
|
*s++ = *(char*)dname++;
|
||||||
else {
|
else {
|
||||||
*s++ = '?';
|
*s++ = '?';
|
||||||
dname++;
|
dname++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue