Wireshark-commits: [Wireshark-commits] master-2.0 15d6b59e8: Check first, then allocate.
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=15d6b59e8d6bc2647ed49a33f6b931161ba34027
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark
Commits:
15d6b59e8 by Guy Harris (guy@xxxxxxxxxxxx):
Check first, then allocate.
While we're at it, the MS-WSP spec says that the array size is unsigned,
and sizeof is always unsigned, so do unsigned arithmetic when doing the
multiplication, so we don't have to worry about overflowing the maximum
int size.
Bug: 12341
Change-Id: Ibe8d6cea2628ab9c50a2de55f8533ec07cc4e576
Reviewed-on: https://code.wireshark.org/review/14936
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from ddd2177 GSM: add a sanity check
adds 15d6b59e8 Check first, then allocate.
Summary of changes:
epan/dissectors/packet-mswsp.c | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)