]> git.ipfire.org Git - thirdparty/bind9.git/commit
Tweak buffer sizes to prevent compilation warnings
authorMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)
committerMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 19:25:18 +0000 (21:25 +0200)
commit3384455659a7d64d7dae86038b317c7a835aafca
tree57f39980ca519646c1d255a5fa115aaef72891ba
parentb5cd146033a5a269cae5784ef64d7045fa9f487c
Tweak buffer sizes to prevent compilation warnings

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.
lib/ns/query.c