mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Host_Loadgame_f: block relative paths, like Host_Savegame_f does
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1396 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
f01ba4b8d8
commit
87a7f01f75
1 changed files with 6 additions and 0 deletions
|
@ -1126,6 +1126,12 @@ void Host_Loadgame_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (strstr(Cmd_Argv(1), ".."))
|
||||
{
|
||||
Con_Printf ("Relative pathnames are not allowed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cls.demonum = -1; // stop demo loop in case this fails
|
||||
|
||||
q_snprintf (name, sizeof(name), "%s/%s", com_gamedir, Cmd_Argv(1));
|
||||
|
|
Loading…
Reference in a new issue