Wireshark-commits: [Wireshark-commits] master-2.2 beaebe9: proto.c: do not dereference a NULL point
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 18 May 2018 11:04:17 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=beaebe91b14564fb9f86f0726bab09927872721b
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

beaebe9 by Pascal Quantin (pascal.quantin@xxxxxxxxx):

    proto.c: do not dereference a NULL pointer in proto_item_get_len() on first pass
    
    Like the proto_item_set_XXX functions, check proto_item pointer validity
    before using it. It can be NULL on first pass for example.
    
    Bug: 14703
    Change-Id: I94957e0738d66f99793682dc0ea1c7c0a65ceecd
    Reviewed-on: https://code.wireshark.org/review/27629
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 40dbc0ccf26152a058484368526b7bd70c8928c1)
    Reviewed-on: https://code.wireshark.org/review/27636
    

Actions performed:

    from  a55b36c   gsm_a_dtap: fix off-by-one buffer overflow (write)
    adds  beaebe9   proto.c: do not dereference a NULL pointer in proto_item_get_len() on first pass


Summary of changes:
 epan/proto.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)