From a61087741e3ec49ddf32513aa347532f05723060 Mon Sep 17 00:00:00 2001 From: Alisson Bruno Date: Wed, 3 Jul 2024 00:19:37 +0200 Subject: [PATCH] initialize cap and size of node_list for safety --- c/parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/parser.c b/c/parser.c index 04e7495..baaf34e 100644 --- a/c/parser.c +++ b/c/parser.c @@ -137,6 +137,9 @@ static struct node_list* create_node_list() { exit(1); } + list->size = 0; + list->capacity = 0; + list->items = NULL; return list; }