From 8da7a401424ae889a62ba9fd2b2166bb766789ad Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 3 Sep 2015 20:35:09 +0200 Subject: [PATCH] FS_SetGamedir: reject "." as game directory. also reject empty string. Submitted by: Ozkan Sezer --- src/common/filesystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/filesystem.c b/src/common/filesystem.c index 07a5d46f..ff06069d 100644 --- a/src/common/filesystem.c +++ b/src/common/filesystem.c @@ -1621,7 +1621,7 @@ FS_SetGamedir(char *dir) int i; fsSearchPath_t *next; - if (strstr(dir, "..") || strstr(dir, "/")) + if (!*dir || !strcmp(dir, ".") || strstr(dir, "..") || strstr(dir, "/")) { Com_Printf("Gamedir should be a single filename, not a path.\n"); return;