Wireshark-commits: [Wireshark-commits] master-2.6 15f7765: TRANSUM: fix crash when switching profil

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 27 Jun 2018 18:28:41 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=15f77656629fda08d78cbb4187d5d6944f4cfa1b
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark

Commits:

15f7765 by Peter Wu (peter@xxxxxxxxxxxxx):

    TRANSUM: fix crash when switching profiles
    
    "output_rrpd" is NULL when the TRANSUM dissector is disabled (which is
    the default behavior). When switching to a profile where the dissector
    is enabled, redissection happens, but without invoking the init routine.
    This leads to a crash when dissect_transum tries to query "output_rrpd".
    
    Fix this by creating the map unconditionally. Use wmem_map_new_autoreset
    since its contents should be erased for new capture files.
    
    Bug: 13697
    Change-Id: Iea897da8faf8042dffdc74327d9d1221e5fb155f
    Fixes: v2.3.0rc0-1887-g78d56e5dd7 ("Cleanup transum post-dissector.")
    Reviewed-on: https://code.wireshark.org/review/28474
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 910bc034abd8e5209dc6ccd8cacdafdc59b1c9dc)
    Reviewed-on: https://code.wireshark.org/review/28487
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  c73673c   epan: Fix session null-pointer check
    adds  15f7765   TRANSUM: fix crash when switching profiles


Summary of changes:
 plugins/epan/transum/packet-transum.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)