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:
parent
2e368c02a6
commit
d21411452e
13 changed files with 22 additions and 22 deletions
|
@ -656,17 +656,17 @@ void CG_RegisterWeapon( int weaponNum ) {
|
|||
}
|
||||
|
||||
strcpy( path, item->world_model[0] );
|
||||
COM_StripExtension( path, path );
|
||||
COM_StripExtension(path, path, sizeof(path));
|
||||
strcat( path, "_flash.md3" );
|
||||
weaponInfo->flashModel = trap_R_RegisterModel( path );
|
||||
|
||||
strcpy( path, item->world_model[0] );
|
||||
COM_StripExtension( path, path );
|
||||
COM_StripExtension(path, path, sizeof(path));
|
||||
strcat( path, "_barrel.md3" );
|
||||
weaponInfo->barrelModel = trap_R_RegisterModel( path );
|
||||
|
||||
strcpy( path, item->world_model[0] );
|
||||
COM_StripExtension( path, path );
|
||||
COM_StripExtension(path, path, sizeof(path));
|
||||
strcat( path, "_hand.md3" );
|
||||
weaponInfo->handsModel = trap_R_RegisterModel( path );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue