From 1f4c3514ad8eed4abe11040cb4d575b94f14d74a Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 9 Apr 2017 20:42:22 +0000 Subject: [PATCH] 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 --- Quake/host_cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Quake/host_cmd.c b/Quake/host_cmd.c index b8ff444c..626dc8d7 100644 --- a/Quake/host_cmd.c +++ b/Quake/host_cmd.c @@ -1125,6 +1125,12 @@ void Host_Loadgame_f (void) Con_Printf ("load : 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