mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gmem.c: array is only paritally filled by memcpy
The size of the local_data arrray is too large. It should not be multiplied by the sizeof guint. The memcpy of profile_data to local_data later will only fill a part of the array. Spotted with the PVS-Studio static analyzer https://bugzilla.gnome.org/show_bug.cgi?id=681501
This commit is contained in:
parent
248cc2c885
commit
96a0c589ee
@ -714,7 +714,7 @@ profile_print_locked (guint *local_data,
|
||||
void
|
||||
g_mem_profile (void)
|
||||
{
|
||||
guint local_data[(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])];
|
||||
guint local_data[(MEM_PROFILE_TABLE_SIZE + 1) * 8];
|
||||
gsize local_allocs;
|
||||
gsize local_zinit;
|
||||
gsize local_frees;
|
||||
|
Loading…
Reference in New Issue
Block a user