You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
853 B
23 lines
853 B
commit 60e77f638c6bf3fcc147cfabde0384c31a5c797d
|
|
Author: Matthew Garrett <mjg@redhat.com>
|
|
Date: Tue Jun 29 15:29:26 2010 -0400
|
|
|
|
Realloc the correct amount of memory
|
|
|
|
Pointers are more than a byte long - make sure that we realloc enough space
|
|
to fit another one.
|
|
|
|
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
|
|
index d61c4be..ea9fe21 100644
|
|
--- a/gsettings/gsettings-data-convert.c
|
|
+++ b/gsettings/gsettings-data-convert.c
|
|
@@ -449,7 +449,7 @@ main (int argc, char *argv[])
|
|
|
|
/* Add the the file to the converted list */
|
|
len = g_strv_length (converted);
|
|
- converted = g_realloc (converted, len + 1);
|
|
+ converted = g_realloc (converted, (len + 2) * sizeof(gchar *));
|
|
converted[len] = g_strdup (name);
|
|
converted[len + 1] = NULL;
|
|
}
|