summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-03-10 17:43:53 -0500
committerRyan Lortie <desrt@desrt.ca>2012-03-10 17:44:40 -0500
commitb494c02f2c71cc379e8228a8c7082c6f81d7740e (patch)
tree716f6cd7c2315fb65b64e79ad4931ac68542b357
parent8ba21cf8e45344e3f98d99ed1b9ae15e16987815 (diff)
downloadgconf-b494c02f2c71cc379e8228a8c7082c6f81d7740e.tar.gz
gsettings-data-convert: fix memory error
This fixes an extremely obvious memory error in the changes introduced by commit d28bd006832bd136c58d42003bf1b0f25f74128e. The upshot of this is reports from malloc() of memory corruption when running gsettings conversions (particularly observed on 32 bit).
-rw-r--r--gsettings/gsettings-data-convert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index 9a3e4ba5..a8af942c 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -68,7 +68,7 @@ get_writable_source_path (void)
{
gchar *copy;
- copy = g_malloc (strlen (match) - 1 + 1);
+ copy = g_malloc (strlen (address) - 1 + 1);
memcpy (copy, address, match - address);
memcpy (copy + (match - address), ":readonly:", 10);
strcpy (copy + (match - address) + 10, match + 11);