mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-28 04:25:16 +08:00
0db4dcafe5
In that function the "length" parameter means off-the-wire length, that is, the length declared inside the outer header. The "caplen" parameter means the amount of bytes actually available in the captured packet. gre_print_0() and the functions modelled after it passed the value of "length" instead of the value of "caplen", this could make ether_print() access beyond the memory allocated for the captured packet. Brian Carpenter had demonstrated this for the OTV case. Fix the involved functions that call ether_print() to pass the correct value and leave a comment to dismiss "caplen" later as its value can be reliably derived from the other ether_print() parameters.
896 B
896 B