bind9/lib
Aram Sargsyan 59e9dfc5b4 Fix a bug in dns_catz_generate_zonecfg()
The dns_catz_generate_zonecfg() function generates a zone configuration
string to use with a new catalog zone member zone. The buffer for the
string is 512 bytes initially (ISC_BUFFER_INCR), but can be reallocated
when required, when using corresponding isc_buffer functions like
isc_buffer_reserve(), isc_buffer_putstr(), isc_buffer_copyregion(), etc.

However, the dns_name_totext() function, which expects the buffer as an
argument, doesn't automatically resize it if the name doesn't fit there,
but instead just returns ISC_R_NOSPACE.

The chance of this occurring increases when the configuration string is
large due to, for example, long zone name, long list of primary servers
which have keys configured and/or TLS configured.

Use dns_name_format() accompanied with isc_buffer_putstr() instead of
dns_name_totext().

(cherry picked from commit 684d7e008a)
2025-12-09 11:12:24 +00:00
..
dns Fix a bug in dns_catz_generate_zonecfg() 2025-12-09 11:12:24 +00:00
isc standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
isccc Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
isccfg standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
ns standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am Move irs_resconf into libdns and remove libirs 2023-02-24 09:38:59 +00:00