]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix buffer overflow in check_zoneconf
authorMatthijs Mekking <matthijs@isc.org>
Thu, 2 Apr 2026 08:21:24 +0000 (10:21 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 2 Apr 2026 08:21:24 +0000 (10:21 +0200)
Removing these two lines prevents the buffer overflow at startup.

lib/bind9/check.c

index b562869a183f19f55c5764e6770d896d1e16e68c..38602496102cd2a83ef84e6dbfd0d05208a19b86 100644 (file)
@@ -1999,8 +1999,6 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        rfc1918 = true;
                else if (dns_name_isula(zname))
                        ula = true;
-               tmp += strlen(tmp);
-               len -= strlen(tmp);
                (void)snprintf(tmp, len, "%u/%s", zclass,
                               (ztype == CFG_ZONE_INVIEW) ? target :
                                (viewname != NULL) ? viewname : "_default");