Ethereal-dev: [Ethereal-dev] Bug in file_dlg.c?

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

From: Michael Tuexen <Michael.Tuexen@xxxxxxxxxxxxxxxxx>
Date: Sun, 20 Jun 2004 18:50:53 +0200
Dear all,

when I start ethereal and try to open a file the application
crashes on Mac OS X.

The reason is that get_basename is called with a NULL pointer.
This comes from file_open_entry_changed, where the code

    /* get the filename */
#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
    cf_name = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_sel));
printf("cf_name = %u.\n", (unsigned int) cf_name); /* changed by me */
#else
cf_name = gtk_file_selection_get_filename(GTK_FILE_SELECTION(file_sel));
#endif

prints
cf_name = 0.
and after that ethereal dies.

[PowerMac:~/Documents/ethereal] tuexen% ./ethereal -v
ethereal 0.10.4 (CVS 20040620164627)
Compiled with GTK+ 2.4.1, with GLib 2.4.1, with libpcap 0.8, with libz 1.1.4,
with libpcre 4.1, without UCD-SNMP or Net-SNMP, without ADNS.

Running with libpcap version 0.8 on Darwin 7.4.0.

Any hints?

Best regards
Michael