]> The Tcpdump Group git mirrors - libpcap/commit
Remove an unnecessary overflow check.
authorGuy Harris <[email protected]>
Thu, 24 May 2018 22:52:43 +0000 (15:52 -0700)
committerGuy Harris <[email protected]>
Thu, 24 May 2018 22:52:43 +0000 (15:52 -0700)
commit40af96cfea9700435445fa1edf5cf6e4cd580a3b
tree6ebb4eb50b05ba55c6742a9d5e21eacf30145007
parent01287da7f4d9832a53253f59a6b054c9f34a97f7
Remove an unnecessary overflow check.

We'll be running on a platform where int is 31 bits plus a sign bit
and size_t is either 32 bits or 64 bits, and the extra headers we put in
a "packet packet" will be much less than 2^31 bytes in size, so adding
the maximum packet size (an int, as pcap_snapshot() returns an int) to
the size of those extra headers won't overflow a size_t.
rpcapd/daemon.c