Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2068] Crash when newly added display filter macro is first

Date: Mon, 24 Dec 2007 16:33:40 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2068


jyoung@xxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1307|                            |review_for_checkin?
               Flag|                            |




------- Comment #1 from jyoung@xxxxxxx  2007-12-24 16:33 GMT -------
Created an attachment (id=1307)
 --> (http://bugs.wireshark.org/bugzilla/attachment.cgi?id=1307&action=view)
fix to macro_copy() function of epan/dfilter/dfilter-macro.c. 

Attached is a patch for bug 2068.   

There were several problems found in the macro_copy() function of
epan/dfilter/dfilter-macro.c. 

#1:  The size of the d->parts array cloned from m->parts was one pointer too
short (missing the final NULL pointer).

#2:  The d-parts array cloned from m->parts was referencing pointers into the
original m->priv and not into the new d-priv.

#3:  The d->priv string cloned from m->priv did not include all the string
sections from the original m->priv.

The patch includes a new DEBUG_MACRO which can be used to dump to stdout the
contents of the various dfilter_macro_t structs at various execution points.
This DEBUG_MACRO functionality can be enabled be uncommenting the /* #define
DUMP_DFILTER_MACRO */ line near the top of the patched dfilter-macro.c file.


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