Wireshark-commits: [Wireshark-commits] master a5a2c3c: Fix infinite loop for when port max range is

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 12 Jan 2016 08:25:48 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a5a2c3c04f131d13a296d3ddc902986ba37a4d0c
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

a5a2c3c by Peter Wu (peter@xxxxxxxxxxxxx):

    Fix infinite loop for when port max range is -1
    
    Due to integer overflow (unsigned -1 + 1 = 0), a call to
    dissector_add_uint_range would be stuck in an infinite loop, eventually
    crashing due to out of memory.
    
    Found when setting radius.alternate_port:-1, but could happen with any
    dissector using similar ports_range constructs.
    
    Change-Id: Ia234e94516446250e959e0f51d552bef704cddff
    Reviewed-on: https://code.wireshark.org/review/13153
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  f83e202   [OSC] implement SLIP framing via TCP for OSC-1.1.
    adds  a5a2c3c   Fix infinite loop for when port max range is -1


Summary of changes:
 epan/packet.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)