Wireshark-dev: Re: [Wireshark-dev] new packet list: crash on Decode-As
From: Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>
Date: Tue, 15 Sep 2009 10:13:43 +0200
Hi,

On Fri, Sep 11, 2009 at 08:56:20AM -0400, Jeff Morriss wrote:
> Not sure if it's just me or not, but when using the new packet list,
> if I use Decode-As (I tried decoding TCP and UDP as just about
> anything), I get a crash every time.

I debug it today, in file.c:rescan_packets() we do:
    /* Cleanup all data structures used for dissection. */
    cleanup_dissection();
    /* Initialize all data structures used for dissection. */
    init_dissection();

cleanup_dissection() calls se_free_all();
And after that fdata->col_text (which is allocated using se_alloc0())
no longer points to valid memory.

Don't know how to fix it in proper way.
(I think it'd be best when fdata->col_text will be allocated with the same lifetime as fdata, possible?)

Cheers.