ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] Access violation in v0.10.6 (reproducible in decode_as_dlg.c)

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

Date: Tue, 24 Aug 2004 23:50:14 +0200 (CEST)
To reproduce the error (access violation on Windows, segmentation fault on
Unix) do:
1. Start a capture, any network data is feasible.
2. Stop the capture (after a while, make sure you have at least one packet
to "decode as").
3. Choose "Analyse -> Decode as" and choose any protocol other than the
one it actually is when captured.
4. Let's say you choose ftp as the protocol to decode the captured stream
as. Now add ftp (only ftp) as filter, this shows of course only the
"Decode as" packets.
5. Choose "Analyse -> Decode as -> default". This causes the access
violation in gtk\decode_as_dlg.c, routine static void
decode_transport(GtkWidget *notebook_pg). The first call to
"decode_change_one_dissector(table_name, cfile.edt->pi.srcport, list);"
fails since cfile.edt in this case is NULL.

I have just started development with ethereal (adding my own protocol
dissectors), so I cannot really tell whether cfile.edt should be verified
to be non-NULL prior to this call (otherwise not perform the call) or if
the actual error is that decode_change_decode_transport was called at all.

The version of decode_as_dlg.c is "$Id: decode_as_dlg.c 11400 2004-07-18
00:24:25Z guy $" (gtk 1.3.0 2003-07-17 and gtk-dev 1.3.0 2003-01-15).

Regards, Peter