GNOME Bugzilla – Bug 698396
GtkTreeStore crashes when reordering 0 elements
Last modified: 2014-05-13 16:00:57 UTC
Created attachment 241950 [details] a small example program The problem is "sort_array[length-1].node->next = NULL;", where length is the number of rows. Steps to Reproduce: create an empty tree store and try to reorder it. Expected result: NOP. Actual result: SIGSEGV. Platform-independent. All GTK+ 2.2 to 3.6.4, probably the newer ones as well. Note: I altered gtktreestore.c a bit to compile it with example.c with gcc -g. The crash will occur at line 2209 in gtk+ 2.22.0 and line 2323 in 3.6.4.
Created attachment 241951 [details] stack trace
Created attachment 242313 [details] [review] treestore: Fix segfault when reordering non-existing children
Created attachment 257360 [details] [review] treestore: Fix segfault when reordering non-existing children Updated patch.
Attachment 257360 [details] pushed as 0d2d190 - treestore: Fix segfault when reordering non-existing children