URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5788a9fc9b9a43c2815f2d72f0a04830a92d496f
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: lts-1.12.1
Repository: wireshark
Commits:
5788a9f by Guy Harris (guy@xxxxxxxxxxxx):
Don't treat the packet length as unsigned.
The scanf family of functions are as annoyingly bad at handling unsigned
numbers as strtoul() is - both of them are perfectly willing to accept a
value beginning with a negative sign as an unsigned value. When using
strtoul(), you can compensate for this by explicitly checking for a '-'
as the first character of the string, but you can't do that with
sscanf().
So revert to having pkt_len be signed, and scanning it with %d, but
check for a negative value and fail if we see a negative value.
Bug: 12394
Change-Id: I4b19b95f2e1ffc96dac5c91bff6698c246f52007
Reviewed-on: https://code.wireshark.org/review/15230
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit 3270dfac43da861c714df76513456b46765ff47f)
Reviewed-on: https://code.wireshark.org/review/15232
(cherry picked from commit edbed5a120e878725ed3ba31484045ee7e817e58)
Reviewed-on: https://code.wireshark.org/review/16112
Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
Actions performed:
from 1a8ed46 Fix packet length handling.
adds 5788a9f Don't treat the packet length as unsigned.
Summary of changes:
wiretap/toshiba.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)