Bug#303471: gossip: segfault on message recipient without optional node identifier

Roland Stigge Roland Stigge <stigge@antcom.de>, 303471@bugs.debian.org
Wed, 06 Apr 2005 23:03:37 +0200


Package: gossip
Version: 0.8-2
Severity: normal

Hi,

trying to contact an address without the optional "<node>@" prefix, e.g.
jabber.org/echo, I made gossip segfault:

========================================================================
$ gdb /usr/bin/gossip
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/
tls/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/gossip 
[Thread debugging using libthread_db enabled]
[New Thread 1088865344 (LWP 18426)]
last page finished

** (gossip:18426): WARNING **: 'jabber.org/echo' is not a valid JID or nick name
.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1088865344 (LWP 18426)]
gossip_roster_get_contact_from_item (roster=0x810c358, item=0x0)
    at gossip-roster.c:1369
1369            contact = g_hash_table_lookup (priv->contacts, item->jid);
(gdb) thread apply all bt

Thread 1 (Thread 1088865344 (LWP 18426)):
#0  gossip_roster_get_contact_from_item (roster=0x810c358, item=0x0)
    at gossip-roster.c:1369
#1  0x0805c96b in app_complete_name_response_cb (dialog=0x816bc20, 
    response=-5, data=0x816c768) at gossip-app.c:1638
#2  0x40626633 in g_cclosure_marshal_VOID () from /usr/lib/libgobject-2.0.so.0
#3  0x406146b6 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#4  0x40625ec8 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#5  0x40624f4c in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#6  0x406251e6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0x4027a54c in gtk_dialog_response () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x406263b6 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#9  0x406146b6 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0x40625ec8 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#11 0x4062470f in g_signal_emitv () from /usr/lib/libgobject-2.0.so.0
#12 0x4022a04b in gtk_bin_get_child () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x4022ac9d in gtk_binding_set_add_path () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x4022af45 in gtk_binding_set_add_path () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x4022b170 in gtk_bindings_activate_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0x403e3528 in gtk_widget_mnemonic_activate ()
   from /usr/lib/libgtk-x11-2.0.so.0
#17 0x40283e3c in _gtk_entry_get_borders () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x402f46de in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#19 0x40614949 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#20 0x406146b6 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0x40625925 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#22 0x40624d3a in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#23 0x406251e6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0x403e38a7 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0
#25 0x403f037f in gtk_window_propagate_key_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#26 0x403f03fc in gtk_window_propagate_key_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#27 0x402f46de in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#28 0x40614949 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#29 0x406146b6 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#30 0x40625925 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#31 0x40624d3a in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#32 0x406251e6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#33 0x403e38a7 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0
#34 0x402f329e in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#35 0x402f2046 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x404ef815 in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#37 0x406646c2 in g_main_depth () from /usr/lib/libglib-2.0.so.0
#38 0x40665748 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#39 0x40665a80 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0x40666023 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#41 0x402f18f3 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#42 0x08069a8d in main (argc=136505728, argv=0x822e980) at gossip-main.c:170
========================================================================

Thanks for considering.

bye,
  Roland

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)

Versions of packages gossip depends on:
ii  gconf2               2.8.1-5             GNOME configuration database syste
ii  libc6                2.3.2.ds1-20        GNU C Library: Shared libraries an
ii  libgconf2-4          2.8.1-5             GNOME configuration database syste
ii  libglade2-0          1:2.4.2-2           library to load .glade files at ru
ii  libglib2.0-0         2.6.3-1             The GLib library of C routines
ii  libgnome2-0          2.8.1-2             The GNOME 2 library - runtime file
ii  libgnomeui-0         2.8.1-3             The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0       2.8.4-2             The GNOME virtual file-system libr
ii  libgtk2.0-0          2.6.2-4             The GTK+ graphical user interface 
ii  libloudmouth1-0      0.17.2-2            Lightweight C Jabber library
ii  libpango1.0-0        1.8.1-1             Layout and rendering of internatio
ii  libpopt0             1.7-5               lib for parsing cmdline parameters
ii  libx11-6             4.3.0.dfsg.1-12.0.1 X Window System protocol client li
ii  libxext6             4.3.0.dfsg.1-12.0.1 X Window System miscellaneous exte
ii  libxml2              2.6.16-6            GNOME XML library
ii  libxslt1.1           1.1.12-8            XSLT processing library - runtime 
ii  xlibs                4.3.0.dfsg.1-12     X Keyboard Extension (XKB) configu

-- no debconf information