Wireshark-commits: [Wireshark-commits] master-2.2 0d8b2c7: prefs: fix crash when importing old filt
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 27 Jun 2018 09:03:57 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0d8b2c7b6293feafa515fc21841bfdc70e70aebe
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

0d8b2c7 by Peter Wu (peter@xxxxxxxxxxxxx):

    prefs: fix crash when importing old filter expression preference
    
    When the filter label was missing, it would result in a crash
    (use-after-free) while reading the next expression. For example:
    
        gui.filter_expressions.label: Not-Junk
        gui.filter_expressions.expr: tcp.flags.reset==1
        # note: missing label preference
        gui.filter_expressions.expr: dns
    
    While at it, do not duplicate the filter expression,
    "filter_expression_new" has always been copying it.
    
    Change-Id: I980fd720c9a04b679a71dd2e7e8bf5e53c72ac43
    Fixes: 1a046d693b ("Added Filter Toolbar Save functionality.")
    Bug: 11648
    Reviewed-on: https://code.wireshark.org/review/28471
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit d3e3c00fbbe205f16fc279068f1cb989259c3b04)
    Reviewed-on: https://code.wireshark.org/review/28482
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  9b786a0   Q931: do not tap packet if no packet info is present
    adds  0d8b2c7   prefs: fix crash when importing old filter expression preference


Summary of changes:
 epan/prefs.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)