Commit 349f5475 authored by Jonas Holmberg's avatar Jonas Holmberg Committed by Matthias Clasen

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.
parent 51894b7d
......@@ -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 (&params[n_params].value, pspec->value_type,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment