[libpeas] Fix error when more that 16 properties are given to _valist_to_parameter_list()



commit 6f647dba8c113191f985a11e904e9a94e93b1b57
Author: Garrett Regier <alias301 gmail com>
Date:   Fri Mar 4 22:41:54 2011 -0800

    Fix error when more that 16 properties are given to _valist_to_parameter_list()

 libpeas/peas-helpers.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libpeas/peas-helpers.c b/libpeas/peas-helpers.c
index abab7a0..da53772 100644
--- a/libpeas/peas-helpers.c
+++ b/libpeas/peas-helpers.c
@@ -23,6 +23,8 @@
 #include <config.h>
 #endif
 
+#include <string.h>
+
 #include <gobject/gvaluecollector.h>
 
 #include "peas-helpers.h"
@@ -97,6 +99,8 @@ _valist_to_parameter_list (GType         the_type,
         {
           n_allocated_params += 16;
           *params = g_renew (GParameter, *params, n_allocated_params);
+          memset (*params + sizeof (GParameter) * (n_allocated_params - 16),
+                  0, sizeof (GParameter) * 16);
         }
 
       (*params)[*n_params].name = name;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]