Wireshark-commits: [Wireshark-commits] master-2.4 cacb057: wmem_tree: fix crash with wmem_tree_dest

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 12 Oct 2018 08:51:04 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=cacb057d24a0417ffcb2f411c7eedc5a4b3925f0
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-2.4
Repository: wireshark

Commits:

cacb057 by Peter Wu (peter@xxxxxxxxxxxxx):

    wmem_tree: fix crash with wmem_tree_destroy and NULL scope
    
    The function was documented for use with a NULL scope, but it actually
    crashes since callbacks are not available for NULL scopes. git master
    is unaffected, but the GTK+ protocol dialog in 2.4 and 2.6 do crash.
    
    Bug: 14349
    Change-Id: I54350e112192394797cf85eaac4f30194178d7c4
    Fixes: v2.3.0rc0-2597-gb7d6cca4ae ("Add wmem_tree_destroy")
    Reviewed-on: https://code.wireshark.org/review/30126
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit f4be16aa45e76d862ff858e8c36e28a206be3143)
    Reviewed-on: https://code.wireshark.org/review/30157
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  dc4d209   tvbuff_composite: fix buffer overflow due to wrong offset adjustment
     add  cacb057   wmem_tree: fix crash with wmem_tree_destroy and NULL scope


Summary of changes:
 epan/wmem/wmem_tree.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)