fix buffer overflow in hashmap to array function.

This commit is contained in:
William Bell
2025-11-11 03:11:09 +00:00
parent 608fd86003
commit c0ba18c37e
4 changed files with 32 additions and 21 deletions

View File

@@ -54,8 +54,7 @@ ArgonObject *create_ARGON_DICTIONARY_TYPE___string__(size_t argc,
memcpy(string + string_length, string_obj, length);
string_length += length;
for (size_t i = 0; i < keys_length; i++) {
struct node_GC* node = keys[i];
if (!node) { fprintf(stderr, "NULL node at %zu\n", i); continue; }
struct node_GC *node = keys[i];
ArgonObject *key = node->key;
ArgonObject *value = node->val;