From: Mark Andrews Date: Tue, 19 May 2026 01:12:46 +0000 (+1000) Subject: Fix dns_name_fromwire to honour the active region X-Git-Tag: v9.21.24~13^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4f07a7ef6b571073327b02209df7f75b9363ff;p=thirdparty%2Fbind9.git Fix dns_name_fromwire to honour the active region dns_name_fromwire was not honouring the source buffer's active region when reading names from the wire. This allowed malformed records to be accepted when they shouldn't have been. This has been corrected. --- diff --git a/lib/dns/name.c b/lib/dns/name.c index 1bb3f40f654..e8abbfcd37c 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -1352,7 +1352,7 @@ dns_name_fromwire(dns_name_t *const name, isc_buffer_t *const source, * The amount of the source we consumed is set once. */ const uint8_t *const source_buf = isc_buffer_base(source); - const uint8_t *const source_max = isc_buffer_used(source); + const uint8_t *const source_max = isc_buffer_active(source); const uint8_t *const start = isc_buffer_current(source); const uint8_t *marker = start; const uint8_t *cursor = start;