ZDI-CAN-28158: use g_malloc0 instead of g_malloc

To avoid accessing uninitialized memory, replace calls to g_malloc with
g_malloc0 which initializes the allocated memory to zero.
This commit is contained in:
Gabriele Barbero 2025-12-05 19:13:01 +01:00 committed by Bruno
parent cf8fdbe685
commit 112a5e038f

View file

@ -693,7 +693,7 @@ load_image (GFile *file,
return NULL;
/* allocate the necessary structures */
pnminfo = g_new (PNMInfo, 1);
pnminfo = g_new0 (PNMInfo, 1);
pnminfo->tupltype = NULL;