]> The Tcpdump Group git mirrors - libpcap/commit
Add checks for a negative or too-long snapshot length.
authorGuy Harris <[email protected]>
Wed, 9 May 2018 18:50:47 +0000 (11:50 -0700)
committerGuy Harris <[email protected]>
Wed, 9 May 2018 18:50:47 +0000 (11:50 -0700)
commite3cdd5a430c5f56c9d242d98cc02febdd7f5b938
tree92c4d311adcf90b1a05a6348f0ebc05505bc84b5
parent8dfce91e2592532fe7b75066a9b4552250a1c577
Add checks for a negative or too-long snapshot length.

The latter check should prevent overflows on ILP32 platforms, although
they're unlikely to happen in practice, given the limits we impose on
snapshot lengths.  That should fix Coverity CID 1420971.

The former check means we can get away with casting the snapshot length
to unsigned int, suppressing a signed vs. unsigned comparison warning.
This should never fail in practice.
rpcapd/daemon.c