From: wenxuan70 Date: Sun, 24 Nov 2024 09:53:23 +0000 (+0800) Subject: Fix the dname_str method to cause conversion errors when the domain name length is 255 X-Git-Tag: release-1.23.0rc1~88^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1189%2Fhead;p=thirdparty%2Funbound.git Fix the dname_str method to cause conversion errors when the domain name length is 255 --- diff --git a/util/data/dname.c b/util/data/dname.c index 76b2ec7d6..cb78f5d63 100644 --- a/util/data/dname.c +++ b/util/data/dname.c @@ -654,7 +654,7 @@ void dname_str(uint8_t* dname, char* str) return; } len += lablen+1; - if(len >= LDNS_MAX_DOMAINLEN-1) { + if(len >= LDNS_MAX_DOMAINLEN) { *s++ = '&'; *s = 0; return;