mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
fix a buffer overrun issue with -game
This commit is contained in:
parent
a8d171ec40
commit
b43651685a
1 changed files with 1 additions and 1 deletions
|
@ -1168,7 +1168,7 @@ QFS_Init (const char *game)
|
||||||
if (gamedirs[j] == ',')
|
if (gamedirs[j] == ',')
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
list = malloc (count * sizeof (char *));
|
list = calloc (count + 1, sizeof (char *));
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
where = strtok (gamedirs, ",");
|
where = strtok (gamedirs, ",");
|
||||||
|
|
Loading…
Reference in a new issue