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

Commits:

1019f3b 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>
    (cherry picked from commit 933a73177736171214c2ae853fa3819fc09016bc)
    Reviewed-on: https://code.wireshark.org/review/19395
    

Actions performed:

    from  0d94a4a   RPC: fix crash when using "Dissect unknown RPC program numbers" option
    adds  1019f3b   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(-)