Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 6e6f270

Browse files
author
Andrei Warkentin
authored
Merge pull request #13 from kilaterlee/Submit20241114
glib_compat/glib_compact: Clear the buffer in g_hash_table_resize
2 parents 6acd078 + 1af4411 commit 6e6f270

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

glib_compat/glib_compat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ static void g_hash_table_resize (GHashTable *hash_table)
716716
g_hash_table_set_shift_from_size (hash_table, hash_table->nnodes * 2);
717717

718718
new_nodes = g_new0 (GHashNode, hash_table->size);
719+
memset(new_nodes, 0, hash_table->size * sizeof(GHashNode));
719720

720721
for (i = 0; i < old_size; i++)
721722
{

0 commit comments

Comments
 (0)