From: Roy Marples Date: Sun, 16 Feb 2020 09:38:57 +0000 (+0000) Subject: Revert "dhcp: Cast away a compile warning" X-Git-Tag: v9.0.0~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0429aafbc0372c9675d0d0a8fb23d2cbe3f822b;p=thirdparty%2Fdhcpcd.git Revert "dhcp: Cast away a compile warning" This reverts commit ccf3a5e9fe4ea8f63cfcdb27f96b02ec2cc8ff70. This has been determined to be a gcc bug and will be worked around another way in the build system. --- diff --git a/src/dhcp.c b/src/dhcp.c index 11a2c18e..4015c65f 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -3370,7 +3370,7 @@ is_packet_udp_bootp(void *packet, size_t plen) memcpy(&udp, (char *)ip + ip_hlen, sizeof(udp)); if (ntohs(udp.uh_ulen) < sizeof(udp)) return false; - if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen) + if (ip_hlen + ntohs(udp.uh_ulen) > plen) return false; /* Check it's to and from the right ports. */