From a0712f58337cc1a3805310582cf1e3f32858d9e1 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 7 Mar 2020 01:38:45 -0500 Subject: Bugfix: Fix potential overrun by strlist_count --- src/strlist.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/strlist.c') diff --git a/src/strlist.c b/src/strlist.c index 5f93201..ed00fb1 100644 --- a/src/strlist.c +++ b/src/strlist.c @@ -31,6 +31,7 @@ void strlist_append(StrList *pStrList, char *str) { } pStrList->data = tmp; pStrList->data[pStrList->num_inuse] = strdup(str); + pStrList->data[pStrList->num_alloc] = NULL; strcpy(pStrList->data[pStrList->num_inuse], str); pStrList->num_inuse++; pStrList->num_alloc++; -- cgit