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

Commits:

e50f7ce 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/27634
    

Actions performed:

    from  30a0fc2   GQUIC: Tag are always use LITTLE ENDIAN encoding
    adds  e50f7ce   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(-)