]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #1282: log-destaddr fail on long ipv6 addresses.
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Tue, 13 May 2025 09:02:58 +0000 (11:02 +0200)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Tue, 13 May 2025 09:02:58 +0000 (11:02 +0200)
doc/Changelog
util/data/msgreply.c

index 3b169e7939002af3b93db778d9c115e7b4948ccb..c44bf4f228524a9d6c81eb45e9346542973593bd 100644 (file)
@@ -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
index e98dce133039494fa8d5038556c85ca9595404e0..35d768f9a4455d04b268895161b0722181a13d36 100644 (file)
@@ -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);