]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Fix prior to not waste space
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 16 Oct 2019 21:52:26 +0000 (22:52 +0100)
committerRoy Marples <roy@marples.name>
Wed, 16 Oct 2019 21:52:26 +0000 (22:52 +0100)
src/dhcp.c

index f0db3cca91418761b937ef3fd6ff6f44ed92c86e..fb3462993a7bcb35adb9b3b7f566054680fd9bb2 100644 (file)
@@ -3315,7 +3315,7 @@ checksums_valid(void *packet,
        struct ip *ip = packet;
        union pip {
                struct ip ip;
-               uint16_t w[sizeof(struct ip)];
+               uint16_t w[sizeof(struct ip) / 2];
        } pip = {
                .ip.ip_p = IPPROTO_UDP,
                .ip.ip_src = ip->ip_src,