From: Yorgos Thessalonikefs Date: Tue, 13 May 2025 09:02:58 +0000 (+0200) Subject: - Fix #1282: log-destaddr fail on long ipv6 addresses. X-Git-Tag: release-1.24.0rc1~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9152c914af4c1281c9b406f130191d5223330f94;p=thirdparty%2Funbound.git - Fix #1282: log-destaddr fail on long ipv6 addresses. --- diff --git a/doc/Changelog b/doc/Changelog index 3b169e793..c44bf4f22 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 13 May 2025: Yorgos - Fix #1284: NULL pointer deref in az_find_nsec_cover() (latent bug) by adding a log_assert() to safeguard future development. + - Fix #1282: log-destaddr fail on long ipv6 addresses. 12 May 2025: Yorgos - Merge #1280: Fix auth nsec3 code. Fixes NSEC3 code to not break on diff --git a/util/data/msgreply.c b/util/data/msgreply.c index e98dce133..35d768f9a 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -984,14 +984,14 @@ log_reply_info(enum verbosity_value v, struct query_info *qinf, if(daddr->ss_family == AF_INET6) { struct sockaddr_in6 *d = (struct sockaddr_in6 *)daddr; if(inet_ntop(d->sin6_family, &d->sin6_addr, da, - sizeof(*d)) == 0) + sizeof(da)) == 0) snprintf(dest_buf, sizeof(dest_buf), "(inet_ntop_error)"); port = ntohs(d->sin6_port); } else if(daddr->ss_family == AF_INET) { struct sockaddr_in *d = (struct sockaddr_in *)daddr; if(inet_ntop(d->sin_family, &d->sin_addr, da, - sizeof(*d)) == 0) + sizeof(da)) == 0) snprintf(dest_buf, sizeof(dest_buf), "(inet_ntop_error)"); port = ntohs(d->sin_port);