Wireshark-commits: [Wireshark-commits] master-2.6 fa315d6: Make sure the offset doesn't overflow.
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fa315d638e769cf016385210a366a77bd197a70b
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark
Commits:
fa315d6 by Guy Harris (guy@xxxxxxxxxxxx):
Make sure the offset doesn't overflow.
It'd only overflow if the value is *so* large that it won't fit in the
packet (given that we have a 2^32-1-byte limit on the packet size), so
use tvb_ensure_bytes_exist() to ensure we have the entire value before
processing the value.
(The real problem is that we don't handle the case where there's a value
multiplicity > 1 for some types; in those cases, we should loop,
processing all the values, which would cause us to eventually throw an
exception when we ran past the end of the packet. This is just a quick
fix.)
Bug: 14742
Change-Id: I447ece81d1c84d3b1d218faeb2c155f910208c29
Reviewed-on: https://code.wireshark.org/review/27853
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit 25118898a931589cfdea4693e056a02b7daecf10)
Reviewed-on: https://code.wireshark.org/review/27854
Actions performed:
from 083e569 Fix incorrect formatting of NSAP area addresses/address prefixes.
adds fa315d6 Make sure the offset doesn't overflow.
Summary of changes:
epan/dissectors/packet-dcm.c | 5 +++++
1 file changed, 5 insertions(+)