Wireshark-commits: [Wireshark-commits] master e3ee681: c15ch: check packet sanity before allocating

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 25 Apr 2015 23:50:33 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e3ee6818eb9c61cd174b352e790a1b60005a18c6
Submitter: Alexis La Goutte (alexis.lagoutte@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

e3ee681 by Evan Huus (eapache@xxxxxxxxx):

    c15ch: check packet sanity before allocating
    
    The 'num_digits' parameter to add_digits_string_info_col can come straight from
    the packet. Verify it is sane (e.g. the number of bytes required are actually
    present) as otherwise we can try and allocate enourmous quantities of memory for
    no reason.
    
    Also clean up the routine; fix indenting, and simplify the loop variables.
    
    Bug: 11148
    Change-Id: I11052652f8d42fa2bb31f37e3c74523842bb3096
    Reviewed-on: https://code.wireshark.org/review/8195
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Petri-Dish: Evan Huus <eapache@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    

Actions performed:

    from  fa16e70   Fix filtering on IP heuristic subdissectors.
    adds  e3ee681   c15ch: check packet sanity before allocating


Summary of changes:
 epan/dissectors/packet-c15ch.c |   47 ++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 24 deletions(-)