Skip to content

array: fix corrupt state of GPtrArray after g_ptr_array_extend_and_steal()

Thomas Haller requested to merge th/g-ptr-array-extend-and-steal-crash into master

g_ptr_array_extend_and_steal() leaves the GPtrArray in an invalid state, so if you would try to append another pointer, it leads to a crash.

Also adjust the test case so that it would result in the crash (without the fix).

Fixes: 0675703a ('Adding g_ptr_array_extend_and_steal() function to glib/garray.c')

Merge request reports

Loading