diff options
author | Jonas Holmberg <jonas.holmberg@axis.com> | 2010-09-24 01:20:50 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-11-28 18:27:30 -0500 |
commit | 349f54756168b76913828136bc646c518c4f475f (patch) | |
tree | 873c2676f674b60e797b1c04be96768d3f64c2dd /gobject | |
parent | 51894b7dd06a3b50654f9ce1fadff418d917aca1 (diff) |
gobject: initialize memory in g_object_new_valist
memset parameters array in g_object_new_valist to zeroes when expanding
the array to avoid acces to uninitialized memory.
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gobject/gobject.c b/gobject/gobject.c index e6f19da74..8b427fa62 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -1565,6 +1565,7 @@ g_object_new_valist (GType object_type, { n_alloced_params += 16; params = g_renew (GParameter, params, n_alloced_params); + memset (params + n_params, 0, 16 * (sizeof *params)); } params[n_params].name = name; G_VALUE_COLLECT_INIT (¶ms[n_params].value, pspec->value_type, |