Ethereal-dev: RE: [Ethereal-dev] [christmasboy_81@xxxxxxxx: Bug#199779: Subject : ethereal: se

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Giles Scott" <gscott2@xxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Sep 2003 09:27:09 +0100
Title: RE: [Ethereal-dev] [christmasboy_81@xxxxxxxx: Bug#199779: Subject : ethereal: segfault when adding filter _expression_]


On Sat, Sep 20, 2003 at 05:16:05PM +0100, Giles Scott wrote:
> item_str is NULL if no relation is specified, so the strcmp is failing.
>
> Attached is a patch. and a gdb backtrace of the issue before the fix.

Why not just do that check immediately after the "Get the relation to
use, if any"? check?
GS> Its just where I happened to put the check as the next line does the strcmp on the null pointer.

Also, can it ever legitimately be null?  (E.g., are there cases where
the relation list isn't made visible?)

GS>Attached is a new patch, which sets 'can_compare' to true, if 'item_str' is null.
If I just click on HTTP but not on a relation, HTTP is added as a filter which is the same as relation == present

Hope this is a better fix.

Cheers

Giles

 

Attachment: dfilter_expr_dlg.c.diff
Description: Binary data