[dconf] Bug 623391 - Crashes at startup
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] Bug 623391 - Crashes at startup
- Date: Sun, 11 Jul 2010 00:41:01 +0000 (UTC)
commit d28587c56c46f37c5dd09f3fe84c65e435259610
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Jul 10 20:39:55 2010 -0400
Bug 623391 - Crashes at startup
Pretty typical heap corruption bug.
I didn't allocate +1 for the NULL pointer at the end of the key array.
service/service.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/service/service.c b/service/service.c
index 4f63d65..2954093 100644
--- a/service/service.c
+++ b/service/service.c
@@ -219,7 +219,7 @@ method_call (GDBusConnection *connection,
g_variant_get (parameters, "(&sa(sav))", &prefix, &iter);
length = g_variant_iter_n_children (iter);
- keys = g_new (const gchar *, length);
+ keys = g_new (const gchar *, length + 1);
values = g_new (GVariant *, length);
while (g_variant_iter_next (iter, "(&s av)", &keys[i], &values[i]))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]