From cd9c6d7811c48d6c717638bb92c722a8f45534bb Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 28 Oct 2004 21:13:52 +0000 Subject: [PATCH] Loophole closed that could have been used to crash the engine. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@385 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_user.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index a165805a5..bad50f923 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -314,6 +314,13 @@ void SVQ2_ConfigStrings_f (void) start = atoi(Cmd_Argv(2)); + if (start < 0) + { + Con_Printf ("SV_Configstrings_f: %s tried crashing us\n", host_client->name); + host_client->drop = true; + return; + } + // write a packet full of data while ( host_client->netchan.message.cursize < MAX_QWMSGLEN/2 @@ -3975,6 +3982,7 @@ haveannothergo: SV_RunCmd (&newcmd, false); SV_PostRunCmd(); + } cl->lastcmd = newcmd;