URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0bffb1663ecb4229699ba7263f4ed7f9824c5fc0
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
0bffb16 by Guy Harris (guy@xxxxxxxxxxxx):
Clean up packet length handling.
Treat the packet length as unsigned - it shouldn't be negative in the
file. If it is, that'll probably cause the sscanf to fail, so we'll
report the file as bad.
A normal packet should be Ethernet-sized; initially make the buffer big
enough for a maximum-sized Ethernet packet.
Once we know the payload length, check to make sure the packet length
won't be > WTAP_MAX_PACKET_SIZE and fail if it will. Then boost the
buffer size to be large enough for the packet, even if it's bigger than
a maximum-sized Ethernet packet.
Change-Id: I75b2108dd68f5bc5cd436bf5b82990089a7116bf
Reviewed-on: https://code.wireshark.org/review/15200
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 80e5546 qt: use NULL instead of Q_NULLPTR
adds 0bffb16 Clean up packet length handling.
Summary of changes:
wiretap/dbs-etherwatch.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)