Wireshark-commits: [Wireshark-commits] master 32923b9: Don't crash if an IDB resolution value is to
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=32923b94a140ecbe39a419e71d828c5a1cf9bc48
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
32923b9 by Guy Harris (guy@xxxxxxxxxxxx):
Don't crash if an IDB resolution value is too high.
When dissecting an if_tsresol option in an IDB, calculate the resolution
from the base and the offset. If the result overflows, mark it as an
overflow; otherwise, mark it with the units for more values than 1
microsecond. Store the calculated resolution, which we initialize to
the default of 1 microsecond.
When displaying time stamps in blocks, use the calculated resolution,
rather than re-calculating it. If it's 0, it means the resolution is
too high, so don't calculate it and end up dividing by zero.
Bug: 14402
Change-Id: Idc34ededb4f7250b3604b14d4468c32f6592793f
Reviewed-on: https://code.wireshark.org/review/25673
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from c0a0003 WSDG: Remove references to Windows XP and Vista.
adds 32923b9 Don't crash if an IDB resolution value is too high.
Summary of changes:
epan/dissectors/file-pcapng.c | 121 ++++++++++++++++++++++++++++++++++--------
1 file changed, 98 insertions(+), 23 deletions(-)