Wireshark-commits: [Wireshark-commits] master-2.4 fb9e31f: 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:37 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fb9e31f0aad30645d42aba886da9e0d8b84c835f
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master-2.4
Repository: wireshark

Commits:

fb9e31f 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/27635
    

Actions performed:

    from  47863b8   Update a comment.
    adds  fb9e31f   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(-)