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
|
@ -230,7 +230,7 @@ void VM_LoadSymbols( vm_t *vm ) {
|
|||
return;
|
||||
}
|
||||
|
||||
COM_StripExtension( vm->name, name );
|
||||
COM_StripExtension(vm->name, name, sizeof(name));
|
||||
Com_sprintf( symbols, sizeof( symbols ), "vm/%s.map", name );
|
||||
len = FS_ReadFile( symbols, (void **)&mapfile );
|
||||
if ( !mapfile ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue