Wireshark-commits: [Wireshark-commits] lts-1.12.1 301713b: proto.c: do not perform bound checks in
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 11 Aug 2016 21:18:11 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=301713bf64c12dea1239471e8df4577f9335f27a
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: lts-1.12.1
Repository: wireshark

Commits:

301713b by Pascal Quantin (pascal.quantin@xxxxxxxxx):

    proto.c: do not perform bound checks in proto_tree_add_text(_valist)_internal if tvb is NULL
    
    As seen in bug 12676, some buggy dissectors do not systematically provide a tvb when calling proto_tree_add_XXX functions.
    On stable branch, let's deactivate the bound checks in that case.
    
    Bug: 12676
    Change-Id: Ia3cf0b0972c127f34feca2e097e0ec1fd1753b23
    Reviewed-on: https://code.wireshark.org/review/16752
    Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    (cherry picked from commit 8c7ab5f2b2c18f23c1baa856e30ff8dcb0b7151c)
    Reviewed-on: https://code.wireshark.org/review/17024
    Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
    

Actions performed:

    from  7879339   proto.c: add bounds check to proto_tree_add_text(_valist)
    adds  301713b   proto.c: do not perform bound checks in proto_tree_add_text(_valist)_internal if tvb is NULL


Summary of changes:
 epan/proto.c |   28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)