Host_Loadgame_f: block relative paths, like Host_Savegame_f does

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1396 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2017-04-09 20:42:22 +00:00
parent 849aee689e
commit 1f4c3514ad
1 changed files with 6 additions and 0 deletions

View File

@ -1125,6 +1125,12 @@ void Host_Loadgame_f (void)
Con_Printf ("load <savename> : load a game\n");
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