Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/dhcpcd/dist/src external/bsd/dhcpcd: Fix a -Wco...
details: https://anonhg.NetBSD.org/src/rev/0b973e27ce60
branches: trunk
changeset: 744630:0b973e27ce60
user: fox <fox%NetBSD.org@localhost>
date: Sat Feb 08 12:17:16 2020 +0000
description:
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@
diffstat:
external/bsd/dhcpcd/dist/src/dhcp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 0e27892c8120 -r 0b973e27ce60 external/bsd/dhcpcd/dist/src/dhcp.c
--- a/external/bsd/dhcpcd/dist/src/dhcp.c Sat Feb 08 11:10:08 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp.c Sat Feb 08 12:17:16 2020 +0000
@@ -3307,7 +3307,7 @@
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. */
Home |
Main Index |
Thread Index |
Old Index