Wireshark-commits: [Wireshark-commits] master d3e3c00: prefs: fix crash when importing old filter e
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 27 Jun 2018 06:10:16 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d3e3c00fbbe205f16fc279068f1cb989259c3b04
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

d3e3c00 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>
    

Actions performed:

    from  c204322   git hooks: prevent first commit message line to exceed 80 chars.
    adds  d3e3c00   prefs: fix crash when importing old filter expression preference


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