gtkterm segfaults on send hexadecimal data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtkterm (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: gtkterm
apt-get install gtkterm
edb@lapedb:~$ dpkg -s gtkterm
Package: gtkterm
Status: install ok installed
Priority: optional
Section: comm
Installed-Size: 228
Maintainer: Sebastien Bacher <email address hidden>
Architecture: i386
Version: 0.99.5-1
Launch it menu -> "View" -> "Send hexadecimal data". A new input box appears, click in it and press "enter" without entering data. It segfault ;-)
Program received signal SIGSEGV, Segmentation fault.
0x080545f4 in ?? ()
(gdb) bt
#0 0x080545f4 in ?? ()
#1 0x00000000 in ?? ()
When I apt-get source it and compile it:
Program received signal SIGSEGV, Segmentation fault.
Send_Hexadecimal (widget=0x80a04a8, event=0x0, pointer=0xb77085d1)
at widgets.c:613
613 all_written[0] = 0;
(gdb) bt
#0 Send_Hexadecimal (widget=0x80a04a8, event=0x0, pointer=0xb77085d1)
at widgets.c:613
#1 0xb7a2c423 in g_cclosure_
from /usr/lib/
#2 0xb7a2079f in g_closure_invoke () from /usr/lib/
#3 0xb7a2f2ea in g_signal_
#4 0xb7a30268 in g_signal_emitv () from /usr/lib/
#5 0xb7d4414c in gtk_bin_get_child () from /usr/lib/
#6 0xb7d45047 in gtk_binding_
#7 0xb7d452b7 in gtk_binding_
#8 0xb7d454a7 in gtk_bindings_
from /usr/lib/
#9 0xb7eebc11 in gtk_widget_activate () from /usr/lib/
#10 0xb7d9f495 in gtk_entry_
#11 0xb7e098e0 in _gtk_marshal_
from /usr/lib/
#12 0xb7a2016f in g_cclosure_new_swap () from /usr/lib/
#13 0xb7a2079f in g_closure_invoke () from /usr/lib/
#14 0xb7a2f9ce in g_signal_
#15 0xb7a30886 in g_signal_
#16 0xb7a30e89 in g_signal_emit () from /usr/lib/
#17 0xb7eebdcf in gtk_widget_activate () from /usr/lib/
#18 0xb7efb46d in gtk_window_
#19 0xb7eff731 in gtk_window_
#20 0xb7e098e0 in _gtk_marshal_
from /usr/lib/
#21 0xb7a2016f in g_cclosure_new_swap () from /usr/lib/
#22 0xb7a2079f in g_closure_invoke () from /usr/lib/
#23 0xb7a2f9ce in g_signal_
#24 0xb7a30886 in g_signal_
#25 0xb7a30e89 in g_signal_emit () from /usr/lib/
#26 0xb7eebdcf in gtk_widget_activate () from /usr/lib/
#27 0xb7e08169 in gtk_propagate_event () from /usr/lib/
#28 0xb7e0846b in gtk_main_do_event () from /usr/lib/
#29 0xb7cabdec in _gdk_events_queue () from /usr/lib/
#30 0xb79af8d6 in g_main_
#31 0xb79b2996 in g_main_
#32 0xb79b2cb8 in g_main_loop_run () from /usr/lib/
#33 0xb7e07765 in gtk_main () from /usr/lib/
#34 0x08052a77 in main (argc=1, argv=0xbfae46f4) at gtkterm.c:68
Which is the following line:
all_written = g_malloc(
all_written[0] = 0;
Since I entered no text strlen(text)*2 equals zero. When you insert:
if(strlen(text) ==0){
message = g_strdup_
Put_
gtk_
g_
return FALSE;
}
before the malloc (line 612) this fixes the issue.
Related branches
Changed in gtkterm: | |
assignee: | nobody → vi64pa |
importance: | Undecided → Low |
Changed in gtkterm: | |
status: | Confirmed → In Progress |
Changed in gtkterm: | |
status: | Fix Committed → Fix Released |
Changed in gtkterm (Ubuntu): | |
assignee: | Michael Bienia (geser) → nobody |
Changed in gtkterm (Ubuntu): | |
assignee: | nobody → Fabrice Coutadeur (fabricesp) |
status: | New → In Progress |
Changed in gtkterm (Ubuntu): | |
assignee: | Fabrice Coutadeur (fabricesp) → nobody |
status: | In Progress → Fix Committed |
Confirmed, happens on my edgy too.