From b43651685a11af9aa4cad0b16923d801d844978f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 21 Apr 2003 04:49:02 +0000 Subject: [PATCH] fix a buffer overrun issue with -game --- libs/util/quakefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 7987bf451..715929a4f 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -1168,7 +1168,7 @@ QFS_Init (const char *game) if (gamedirs[j] == ',') count++; - list = malloc (count * sizeof (char *)); + list = calloc (count + 1, sizeof (char *)); j = 0; where = strtok (gamedirs, ",");