diff options
author | Guy Harris <gharris@sonic.net> | 2021-01-19 19:02:01 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-01-19 19:02:01 -0800 |
commit | 64f1d09ef332511e3caf17fb5943c404c55df5fd (patch) | |
tree | 73cce04c29ca4a41cb0d2ca0b6aae4a05fccfa68 /wiretap/iseries.c | |
parent | 6db087ae4b67b9c1f6e193ce3b7606345988d51d (diff) |
Make various max packet sizes unsigned, and clean up from that.
Make some packet size variables unsigned.
Leave some others signed, because they're read with sscanf(), and
sscanf() handles string-to-unsigned conversions in the same crazy way
strtouX() routines do, wherein a leading sign is *not* an error.
Instead, cast them to unsigned after we make sure they're not negative.
Diffstat (limited to 'wiretap/iseries.c')
-rw-r--r-- | wiretap/iseries.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/iseries.c b/wiretap/iseries.c index 6f55fe110f..38f35b9b90 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -731,7 +731,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, wtap_rec *rec, * Check the length first, just in case it's *so* big that, after * adding the Ethernet header length, it overflows. */ - if (pkt_len > WTAP_MAX_PACKET_SIZE_STANDARD - 14) + if ((guint)pkt_len > WTAP_MAX_PACKET_SIZE_STANDARD - 14) { /* * Probably a corrupt capture file; don't blow up trying |