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:
ewasylishen 2017-04-09 20:42:22 +00:00
parent f01ba4b8d8
commit 87a7f01f75

View file

@ -1125,6 +1125,12 @@ void Host_Loadgame_f (void)
Con_Printf ("load <savename> : load a game\n"); Con_Printf ("load <savename> : load a game\n");
return; 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 cls.demonum = -1; // stop demo loop in case this fails