From 01da6d757bb3121c9ee077e7269eee7655abd05b Mon Sep 17 00:00:00 2001 From: Zachary Slater Date: Thu, 1 Sep 2005 02:13:47 +0000 Subject: [PATCH] https://bugzilla.icculus.org/show_bug.cgi?id=2356 Remotely exploitable Infostring Crash --- code/server/sv_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/server/sv_main.c b/code/server/sv_main.c index fa6a4c80..e83ce197 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -373,6 +373,15 @@ void SVC_Info( netadr_t from ) { return; } + /* + * Check whether Cmd_Argv(1) has a sane length. This was not done in the original Quake3 version which led + * to the Infostring bug discovered by Luigi Auriemma. See http://aluigi.altervista.org/ for the advisory. + */ + + // A maximum challenge length of 128 should be more than plenty. + if(strlen(Cmd_Argv(1)) > 128) + return; + // don't count privateclients count = 0; for ( i = sv_privateClients->integer ; i < sv_maxclients->integer ; i++ ) {