From a679ae64e0a659e2b94ec97e688633bc1a0d041e Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 6 May 2006 01:56:24 +0000 Subject: Add string length checking to function COM_StripExtension. This fixes the R_RemapShader buffer overflow exploit that can be found here: http://milw0rm.com/exploits/1750 git-svn-id: svn://svn.icculus.org/quake3/trunk@765 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'code/client') diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 7b207e5..9a1bcf6 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -2066,7 +2066,7 @@ void CL_Frame ( int msec ) { } Q_strncpyz( mapName, COM_SkipPath( cl.mapname ), sizeof( cl.mapname ) ); - COM_StripExtension( mapName, mapName ); + COM_StripExtension(mapName, mapName, sizeof(mapName)); Cbuf_ExecuteText( EXEC_NOW, va( "record %s-%s-%s", nowString, serverName, mapName ) ); -- cgit v1.2.3