After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669253 - gsettings set buggy on array values
gsettings set buggy on array values
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-02-02 15:46 UTC by Sebastien Bacher
Modified: 2012-02-02 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsettings tool: fix a memory error (1.20 KB, patch)
2012-02-02 15:50 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Sebastien Bacher 2012-02-02 15:46:25 UTC
Using glib 2.31.14, try "gsettings set org.gnome.gedit.preferences.encodings auto-detected "[]""

it prints a bunch of gvariant errors and a "can not parse as value of type `(null)'"
Comment 1 Allison Karlitskaya (desrt) 2012-02-02 15:47:10 UTC
introduced here: http://git.gnome.org/browse/glib/commit/?id=8852d4e9a08e7fbc9df7fb99a54b112f5049ee19

'type' is used after free, causing the parser to have invalid behaviour.
Comment 2 Allison Karlitskaya (desrt) 2012-02-02 15:50:57 UTC
Created attachment 206642 [details] [review]
gsettings tool: fix a memory error

8852d4e9a08e7fbc9df7fb99a54b112f5049ee19 introduced a memory error by
taking the type of a GVariant, freeing the GVariant and using the type
after the free.

This delays the free until after we've used the type.
Comment 3 Allison Karlitskaya (desrt) 2012-02-02 15:55:33 UTC
Attachment 206642 [details] pushed as 387ed23 - gsettings tool: fix a memory error
Comment 4 Sebastien Bacher 2012-02-02 15:56:16 UTC
thanks, the fix works for me