]> The Tcpdump Group git mirrors - libpcap/commit
Make sure the *adjusted* snapshot length is the same for all IDBs.
authorGuy Harris <[email protected]>
Mon, 5 Aug 2019 04:18:53 +0000 (21:18 -0700)
committerGuy Harris <[email protected]>
Mon, 5 Aug 2019 04:18:53 +0000 (21:18 -0700)
commitd6fd84ee114bf038587a860236176bdc7cf397a3
treebad98b5a9c00ff4a3c981fd99eb458e8599dab9f
parent7d97bb23a7ecd40bde41385236b9dd5db167afc4
Make sure the *adjusted* snapshot length is the same for all IDBs.

If the snapshot length is 0, or doesn't fit in an int, we adjust it.  If
we see an IDB after the first IDB, perform the same adjustment on *its*
snapshot length before comparing it with the adjusted snapshot length
for the first IDB.

(Yes, this means that if the IDBs have different snapshot lengths, but
they both adjust to the same value, they will be treated as equal.
That's not a bug, that's a feature - the only reason we insist that they
be the same is so that the value that pcap_snapshot() returns, which,
for pcapng files, is the adjusted snapshot length for the first IDB,
applies to all IDBs, so the IDBs all just have to have the same adjusted
snapshot length.)

This should fix GitHub issue #832.
pcap-int.h
savefile.c
sf-pcap.c
sf-pcapng.c