external/bsd/dhcpcd: Fix a -Wconversion warning.
Type cast uint16_t to size_t to prevent implicit type conversion. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. gcc version 8.3.0 Reviewed by: roy@, kamil@
This commit is contained in:
parent
53a1bd1628
commit
8d2b6606df
2
external/bsd/dhcpcd/dist/src/dhcp.c
vendored
2
external/bsd/dhcpcd/dist/src/dhcp.c
vendored
@ -3307,7 +3307,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 + ntohs(udp.uh_ulen) > plen)
|
||||
if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen)
|
||||
return false;
|
||||
|
||||
/* Check it's to and from the right ports. */
|
||||
|
Loading…
Reference in New Issue
Block a user