Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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. Bug: 12394 Change-Id: Ifa023ce70f7a2697bf151009b035a6e6cf8d5d90 Reviewed-on: https://code.wireshark.org/review/15169 Reviewed-by: Guy Harris <guy@alum.mit.edu>
- Loading branch information