GNOME Bugzilla – Bug 565982
GtkFileChooserDialog crashes when directed at a directory containing improper filenames
Last modified: 2009-01-03 06:00:40 UTC
Steps to reproduce: I've recently reinstalled my computer from a ISO-8859-1 system to a UTF-8 one. When GtkFileChooserDialog tried to list a directory containing a filename with an e-acute encoded in ISO-8859-1 on the filesystem, it crashes. Sorry I am unable to make use of gdb to spot the bug ("Cannot find new threads: generic error"?), but I provide detailed reproduction here (for a UTF-8 system): program: -=-=---=-=---=-=---=-=-- #include <stdlib.h> #include <gtk/gtk.h> int main(int argc, char** argv) { GtkWidget * fc; gtk_init(&argc, &argv); fc = gtk_file_chooser_dialog_new("foo", NULL, GTK_FILE_CHOOSER_ACTION_OPEN, "barz", "1", NULL); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fc), "/tmp/foo"); gtk_dialog_run(GTK_DIALOG(fc)); return 0; } -=-=---=-=---=-=---=-=-- bang: # mkdir /tmp/foo # touch foo/`perl -e 'print pack("H*", "E9")'` # gcc t.c `pkg-config gtk+-2.0 --cflags --libs` && ./a.out *** glibc detected *** ./a.out: free(): invalid next size (fast): 0x082443c0 *** ======= Backtrace: ========= /lib/i686/libc.so.6[0xb770ac64] /lib/i686/libc.so.6(cfree+0x96)[0xb770cd16] /usr/lib/libgio-2.0.so.0[0xb7b227ff] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 08:01 1163970 /tmp/a.out 08049000-0804a000 rw-p 00000000 08:01 1163970 /tmp/a.out 08096000-0825d000 rw-p 08096000 00:00 0 [heap] b6300000-b6321000 rw-p b6300000 00:00 0 b6321000-b6400000 ---p b6321000 00:00 0 b648c000-b6499000 r-xp 00000000 08:01 884790 /lib/libgcc_s-4.3.2.so.1 [...] Stack trace: Other information:
*** This bug has been marked as a duplicate of 565484 ***