Wireshark-bugs: [Wireshark-bugs] [Bug 5002] New: Wireshark crashes if active display filter macr
Date: Tue, 13 Jul 2010 03:06:00 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5002

           Summary: Wireshark crashes if active display filter macro is
                    renamed
           Product: Wireshark
           Version: SVN
          Platform: x86-64
        OS/Version: Fedora
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: tarjei.knapstad@xxxxxxxxx


Created an attachment (id=4910)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=4910)
Stack trace

Build Information:
TShark 1.5.0 (SVN Rev 33477 from /trunk)

Copyright 1998-2010 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GLib 2.20.5, with libpcap 0.9.8, with libz 1.2.3,
without
POSIX capabilities, without libpcre, without SMI, without c-ares, without ADNS,
without Lua, without Python, with GnuTLS 2.6.6, with Gcrypt 1.4.4, with MIT
Kerberos, without GeoIP.

Running on Linux 2.6.30.10-105.2.23.fc11.x86_64, with libpcap version 0.9.8,
with libz 1.2.3, GnuTLS 2.6.6, Gcrypt 1.4.4.

Built using gcc 4.4.1 20090725 (Red Hat 4.4.1-2).

--
Steps to reproduce:

1. Open the "Analyze->Display filter macros..." dialog and create a simple
display filter macro:
   Name: "test"
   Text: "http" (or whatever)
2. Enter "${test}" in the display filter box and apply it.
3. Go back to the "Analyze->Display filter macros..." dialog, select the
previously created macro and change the name from "test" to "test2".
4. Click "Apply" in the "Display filter macros" dialog.
5. Wireshark crashes on the following assert:

ERROR:file.c:518:cf_read: assertion failed: (!cf->dfilter || (compiled &&
dfcode))
Aborted

Complete stack trace leading up to the assertion failure is attached. Bug also
exists in 1.2.9.



Was going to look into patching this, but I guess there are a few different
options:

1. Just force a revalidation of the currently active display filter every time
"Apply" is clicked in the "Display filter macros" dialog. This will force the
user to update the filter if the renamed macro(s) was currently being used.

2. Perform a search-and-replace operation in the currently active filter (if
any) to update the renamed macro(s).

3. ?

Any thoughts?

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.