For some libc implementations, BUFSIZ is small enough (e.g. 1024 for
musl libc) to trigger compilation warnings about insufficient size of
certain buffers. Since the relevant buffers are used for printing DNS
names, increase their size to '(n + 1) * DNS_NAME_FORMATSIZE', where 'n'
is the number of DNS names which are printed to a given buffer. This
results in somewhat arbitrary, albeit nicely-aligned and large enough
buffer sizes.
(cherry picked from commit
3384455659a7d64d7dae86038b317c7a835aafca)
bool failcache;
uint32_t flags;
#ifdef WANT_QUERYTRACE
- char mbuf[BUFSIZ];
+ char mbuf[4 * DNS_NAME_FORMATSIZE];
char qbuf[DNS_NAME_FORMATSIZE];
char tbuf[DNS_RDATATYPE_FORMATSIZE];
#endif