URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=266d3b7d519ba3d9c7e2d179f52bca5529cbd0b0
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
266d3b7 by Guy Harris (guy@xxxxxxxxxxxx):
Move the bitrate test against 0 to mp2t_bits_per_second().
As the comment says, that routine "[ensures] there is a valid bitrate",
and a bitrate of 0, which comes from truncating a fractional bitrate, is
not a valid bitrate (an MPEG-2 Transport Stream with a bitrate less than
1 bit per second is not going to carrry any sensible audio/video
stream).
Make the "first" argument unsigned; it can never be negative.
Restructure the code and change some data types to make it more obvious
that it can't.
Change-Id: Idd4d073dc558bb31271318e14b2f74292cd16a2b
Reviewed-on: https://code.wireshark.org/review/12352
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from d2644ae [NBAP] Fix SIGSEGV in dissect_nbap_MACdPDU_Size
adds 266d3b7 Move the bitrate test against 0 to mp2t_bits_per_second().
Summary of changes:
wiretap/mp2t.c | 44 ++++++++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 18 deletions(-)