fix a buffer overrun issue with -game

This commit is contained in:
Bill Currie 2003-04-21 04:49:02 +00:00
parent a8d171ec40
commit b43651685a

View file

@ -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, ",");