GNOME Bugzilla – Bug 165980
g_key_file_remove_key appears broken
Last modified: 2011-02-18 16:10:09 UTC
Steps to reproduce: It appears that if I use g_key_file_remove_key and take a key off, I wind up with an invalid GKeyFile, which will segfault with things such as g_key_file_to_data. I'm attaching a little test program that demonstrates it. Stack trace: Other information:
Created attachment 36845 [details] sample program segfaults when calling g_key_file_to_data() after g_key_file_remove_key()
2005-02-01 Matthias Clasen <mclasen@redhat.com> * tests/keyfile-test.c (test_key_remove): Add test case for key removal. * glib/gkeyfile.c (g_key_file_remove_key): Actually remove the key from the list of pairs. (#165980, David Hoover)