]> The Tcpdump Group git mirrors - tcpdump/commit
Check the sample, flow, and counter lengths.
authorGuy Harris <[email protected]>
Tue, 5 Apr 2011 02:03:56 +0000 (19:03 -0700)
committerGuy Harris <[email protected]>
Tue, 5 Apr 2011 02:03:56 +0000 (19:03 -0700)
commita9876473a26b45e99ee640938f42026314ce9d88
treeb15aaf3a5139e643b6a2b29e570e5997993a0408
parent8a52e408e912ece76f00a43040d3940b696655b7
Check the sample, flow, and counter lengths.

When dissecting a sample, or a flow or counter within the sample, make
sure we don't run past the length in the sample/flow/counter header.

This also means we count the sample length down as we process the
contents of the sample, so we only add what, if anything, remains of the
sample to the pointer into the packet, and subtract that from the
remaining data length in the packet, which means we properly handle
packets with multiple samples.
print-sflow.c