URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eb8cc59104faa7815ee15ab7152a93173db870be
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark
Commits:
eb8cc59 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.
Change-Id: Idc5392fe414da4558a95ec3c99f36ae5e267e6d1
Reviewed-on: https://code.wireshark.org/review/15219
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 7f77886 Make class "type" for USB conversations.
adds eb8cc59 Don't treat the packet length as unsigned.
Summary of changes:
wiretap/dbs-etherwatch.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)