tighten Host_Game_f() a bit more

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@997 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2014-09-08 16:02:58 +00:00
parent 78fb4b0de5
commit e9a6da6b0b

View file

@ -146,9 +146,9 @@ void Host_Game_f (void)
return;
}
if (!strcmp(p, ".") || strstr(p, ".."))
if (!strcmp(p, ".") || strstr(p, "..") || strstr(p, "/") || strstr(p, "\\") || strstr(p, ":"))
{
Con_Printf ("Relative pathnames are not allowed.\n");
Con_Printf ("gamedir should be a single directory name, not a path\n");
return;
}