diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-04-29 15:46:58 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-04-29 22:51:41 +0000 |
commit | f5ec0afb766f19519ea9623152cca3bbe2229500 (patch) | |
tree | 2edf94a0450ededffd003444c088b6d9fad39a15 /ui/qt/main_window.h | |
parent | 69714b7457dc02a80e7ca453b60d5f5432756158 (diff) | |
download | wireshark-f5ec0afb766f19519ea9623152cca3bbe2229500.tar.gz |
Fix 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.
Check it against WTAP_MAX_PACKET_SIZE to make sure we don't try to
allocate a huge amount of memory, just as we do in other file readers.
Use the now-validated packet size as the length in
ws_buffer_assure_space(), so we are certain to have enough space, and
don't allocate too much space.
Merge the header and packet data parsing routines while we're at it.
Bug: 12395
Change-Id: Ia70f33b71ff28451190fcf144c333fd1362646b2
Reviewed-on: https://code.wireshark.org/review/15172
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main_window.h')
0 files changed, 0 insertions, 0 deletions