mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 16:33:40 +02:00
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.
This commit is contained in:
committed by
Matthias Clasen
parent
51894b7dd0
commit
349f547561
@@ -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,
|
||||
|
Reference in New Issue
Block a user