Wireshark-commits: [Wireshark-commits] master 933a731: DVB-CI: don't call proto_tree_add_subtree_fo
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 23 Dec 2016 09:00:16 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=933a73177736171214c2ae853fa3819fc09016bc
Submitter: Martin Kaiser (wireshark@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

933a731 by Martin Kaiser (wireshark@xxxxxxxxx):

    DVB-CI: don't call proto_tree_add_subtree_format() with tvb==NULL
    
    When I first implemented this, proto_tree_add_subtree_format() worked
    for tvb==NULL if len was also 0. The bounds check added in
    56706427f53cc64793870bf072c2c06248ae88f3 breaks this use case and makes
    DVB-CI spill out dissector asserts.
    
    Warn Dissector bug, protocol DVB-CI, in packet 625:
    ../epan/tvbuff.c:532: failed assertion "tvb && tvb->initialized"
    
    Create a proto_item first and link the subtree to this item. This will
    work as long as proto_tree_add_uint() accepts tvb==NULL.
    
    Thanks to Kay Katzorke for reporting this bug.
    
    Change-Id: I25a071c21925f7d362c92852fd5a8136e4d361c8
    Reviewed-on: https://code.wireshark.org/review/19389
    Petri-Dish: Martin Kaiser <wireshark@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Martin Kaiser <wireshark@xxxxxxxxx>
    

Actions performed:

    from  abe78e9   GSM A GM: align protocol / container id filter format with displayed one
    adds  933a731   DVB-CI: don't call proto_tree_add_subtree_format() with tvb==NULL


Summary of changes:
 epan/dissectors/packet-dvbci.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)