Wireshark-dev: Re: [Wireshark-dev] [PATCH] stats_tree.c fixup preventing segfault
From: Sebastien Tandel <[email protected]>
Date: Wed, 13 Dec 2006 21:58:50 +0100
Hi Stephen,

it's just after ... I leave the filter empty and click create stats :)

see in the code plugins/pinfo_stats_tree.c line 97 :
        st_node_plen = stats_tree_create_range_node(st, st_str_plen, 0,

Anyway, when you asked me how to reproduce it did not crash anymore
(ouchh...). Strange.
However, I remember that I got rid of glib/gtk1.2 yesterday to finally
arrive to something which seems really better, in terms of graphical
interface, gtk+2 (even if I'm merely a command line lover :))  And it
appears that this "slight" change made wireshark more robust or maybe I
was just concerned by an hallucination? :-/

I therefore installed again (just for you :)) glib/gtk1.2 and start a
new compile process (tooooo long) to see what happens ... and here is
one config on which it crashes :
wireshark 0.99.5 (SVN Rev 20130)

Copyright 1998-2006 Gerald Combs <[email protected]> and contributors.
This is free software; see the source for copying conditions. There is NO

Compiled with GTK+ 1.2.10, with GLib 1.2.10, with libpcap 0.7.2, with libz
1.2.3, with libpcre 5.0, without UCD-SNMP or Net-SNMP, with ADNS,
without Lua,
with GnuTLS 1.4.4, with Gcrypt 1.2.3, without Kerberos, without PortAudio,
without AirPcap.

Running on Linux, with libpcap (version unknown).

Built using gcc 4.0.4 20060630 (prerelease) (Debian 4.0.3-5).

I did not test the patch on the glib/gtk+2 ... not yet :)


Sebastien Tandel

Stephen Fisher wrote:
> On Tue, Dec 12, 2006 at 04:41:19AM +0100, Sebastien Tandel wrote:
>>    here is a patch against svn rev20122 which prevents wireshark from 
>> segfault when trying the stats module "packet length". the function 
>> affected is get_range in epan/stats_tree.c which did not the correct 
>> tests if you want define range like the following :
>> "-" 
>> "10-"
>> "-10"
>> "0-10"
>> giving G_MININT (G_MAXINT) if the number is not defined to the left (right).
> Where do you go to reproduce this problem?  Statistics->Packet Length 
> accepts a filter instead of a packet range.
> Steve
> _______________________________________________
> Wireshark-dev mailing list
> [email protected]
> http://www.wireshark.org/mailman/listinfo/wireshark-dev