Module Name: src
Committed By: fox
Date: Sat Feb 8 12:17:16 UTC 2020
Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c
Log Message:
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@
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/dhcp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.32 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.33
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.32 Mon Jan 27 20:42:56 2020
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat Feb 8 12:17:16 2020
@@ -3307,7 +3307,7 @@ is_packet_udp_bootp(void *packet, size_t
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. */