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
|
@ -1823,7 +1823,7 @@ void RE_LoadWorldMap( const char *name ) {
|
|||
Q_strncpyz( s_worldData.name, name, sizeof( s_worldData.name ) );
|
||||
|
||||
Q_strncpyz( s_worldData.baseName, COM_SkipPath( s_worldData.name ), sizeof( s_worldData.name ) );
|
||||
COM_StripExtension( s_worldData.baseName, s_worldData.baseName );
|
||||
COM_StripExtension(s_worldData.baseName, s_worldData.baseName, sizeof(s_worldData.baseName));
|
||||
|
||||
startMarker = ri.Hunk_Alloc(0, h_low);
|
||||
c_gridVerts = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue