2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Increase the BUFSIZ-long buffers

The BUFSIZ value varies between platforms, it could be 8K on Linux and
512 bytes on mingw.  Make sure the buffers are always big enough for the
output data to prevent truncation of the output by appropriately
enlarging or sizing the buffers.
This commit is contained in:
Ondřej Surý
2022-07-14 13:48:45 +02:00
committed by Aram Sargsyan
parent f7066bb71a
commit b35861f1eb
6 changed files with 15 additions and 14 deletions

View File

@@ -12,6 +12,7 @@
*/
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <isc/aes.h>
@@ -955,7 +956,7 @@ isc_result_t
ns_client_addopt(ns_client_t *client, dns_message_t *message,
dns_rdataset_t **opt) {
unsigned char ecs[ECS_SIZE];
char nsid[BUFSIZ], *nsidp = NULL;
char nsid[_POSIX_HOST_NAME_MAX + 1], *nsidp = NULL;
unsigned char cookie[COOKIE_SIZE];
isc_result_t result;
dns_view_t *view = NULL;