Wireshark-commits: [Wireshark-commits] master-2.6 0cbd0cc: prefs: fix crash when importing old filt
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0cbd0cccda83ddc1740ec57973f05ab63967f54d
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark
Commits:
0cbd0cc 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/28480
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from c616ea9 Qt: Fix crash when starting to drag on the wrong position
adds 0cbd0cc prefs: fix crash when importing old filter expression preference
Summary of changes:
epan/prefs.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)