Wireshark-commits: [Wireshark-commits] master 40dbc0c: proto.c: do not dereference a NULL pointer i

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 18 May 2018 09:19:23 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=40dbc0ccf26152a058484368526b7bd70c8928c1
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

40dbc0c 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>
    

Actions performed:

    from  ad80dd0   BOOTP: Disentangle BSDP naming from PacketCable.
    adds  40dbc0c   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(-)