[gconf] gsettings-data-convert: fix memory error
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gconf] gsettings-data-convert: fix memory error
- Date: Sat, 10 Mar 2012 22:52:55 +0000 (UTC)
commit b494c02f2c71cc379e8228a8c7082c6f81d7740e
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Mar 10 17:43:53 2012 -0500
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).
gsettings/gsettings-data-convert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index 9a3e4ba..a8af942 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]