Wireshark-dev: Re: [Wireshark-dev] Wireshark crash on Windows (latest SVN)

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Thu, 23 Nov 2006 00:07:27 +0100
Greg Morris wrote:
I just built Wireshark after performing a svn update. If Wireshark is the active application (has focus) and you hit <alt><ctl><del> to lock the computer, when you unlock or cancel you will find the Wireshark application has crashed. Seems like the work to change the keyboard input to automatically echo to the display filter window is causing the crash. Note that you don't have to have any files loaded, just launch Wireshark, make sure it's the primary application with focus, then press <alt><ctl><del> on the keyboard. We crash in top_level_key_pressed_cb() ******************************************************************
static int
top_level_key_pressed_cb(GtkCTree *ctree _U_, GdkEventKey *event, gpointer user_data _U_)
{
    if (event->keyval == GDK_F8) {
 packet_list_next();
 return TRUE;
    } else if (event->keyval == GDK_F7) {
 packet_list_prev();
 return TRUE;
} else if (isprint(event->keyval)) { <----------------------This is where we crashed.............
 /* Forward the keypress on to the display filter entry */
if (main_display_filter_widget && !gtk_widget_is_focus(main_display_filter_widget)) { gtk_window_set_focus(GTK_WINDOW(top_level), main_display_filter_widget); gtk_editable_set_position(GTK_EDITABLE(main_d isplay_filter_widget), -1);
 }
 return FALSE;
    }
    return FALSE;
}
event->keyval == 65513
********************************************************************** Version 0.99.5 (SVN Rev 19956) Copyright 1998-2006 Gerald Combs <gerald@xxxxxxxxxxxxx <mailto:gerald@xxxxxxxxxxxxx>> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled with GTK+ 2.8.20, with GLib 2.12.4, with WinPcap (version unknown), with libz 1.2.3, with libpcre 6.4, with Net-SNMP 5.3.1, with ADNS, with Lua 5.1, with GnuTLS 1.5.1, with Gcrypt 1.2.3, with MIT Kerberos, with PortAudio <= V18,
with AirPcap.
Running on Windows XP Service Pack 2, build 2600, with WinPcap version 3.1 (packet.dll version 3, 1, 0, 27), based on libpcap version 0.9[.x], without
AirPcap.
Built using Microsoft Visual C++ 6.0
Cannot reproduce this on my machine - with the same lib versions.

Don't know why this crashes on your machine.

isprint() doesn't have a limited input range so it shouldn't crash on this call - and on my machine it doesn't do so even with the value 65513.

Did you tried a distclean which might help in curious cases ...

Regards, ULFL