ensure local array is same size as global
authorderaadt <deraadt@openbsd.org>
Sat, 27 Feb 2021 17:47:43 +0000 (17:47 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 27 Feb 2021 17:47:43 +0000 (17:47 +0000)
sbin/resolvd/resolvd.c

index 01c9da5..0f73b8b 100644 (file)
@@ -397,7 +397,7 @@ findslot(struct rdns_proposal *tab)
 void
 handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
 {
-       struct rdns_proposal             learning[ASR_MAXNS];
+       struct rdns_proposal             learning[nitems(learned)];
        struct sockaddr_rtdns           *rtdns;
        struct if_announcemsghdr        *ifan;
        int                              rdns_count, af, i;