[Geany] Crash in geany 0.3 while searching for %size

Nick Treleaven nick.treleaven at xxxxx
Wed Dec 28 00:28:10 UTC 2005


Ali Shah wrote:

> Geany exits out while searching for "%size" in any file, blank or 
> otherwise.
> (I haven't switched to 0.4, can anyone who is using 0.4 confirm this?)
> Ali

I get the same problem with Geany 0.4.

I think the problem is line 144-145 of src/dialogs.c:
    dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), 
GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_QUESTION, 
GTK_BUTTONS_YES_NO, string);

If 'string' contains a % character e.g. %s then
gtk_message_dialog_new looks for another string argument on the stack, 
causing a segfault.

I have a quick backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x442f0c7b in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0  0x442f0c7b in strlen () from /lib/tls/libc.so.6
#1  0x442c5155 in vfprintf () from /lib/tls/libc.so.6
#2  0x442e2216 in vasprintf () from /lib/tls/libc.so.6
#3  0x4a5cc311 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#4  0x4a5bdd25 in g_strdup_vprintf () from /usr/lib/libglib-2.0.so.0
#5  0x4a89367f in gtk_message_dialog_new () from /usr/lib/libgtk-
x11-2.0.so.0
#6  0x08073c65 in dialogs_show_not_found ()
#7  0x080845f4 in document_find_next ()
#8  0x080993d9 in on_toolbutton18_clicked ()



More information about the Users mailing list