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
This commit is contained in:
Thilo Schulz committed 2006-05-06 01:56:24 +00:00
1 parent 2e368c02a6
commit d21411452e
13 files changed
+22 -22

No files matched your search

+1 -1
View File
@@ -3451,7 +3451,7 @@ void FS_FilenameCompletion( const char *dir, const char *ext,
Q_strncpyz( filename, filenames[ i ], MAX_STRING_CHARS );
if( stripExt ) {
COM_StripExtension( filename, filename );
COM_StripExtension(filename, filename, sizeof(filename));
}
callback( filename );