mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: fix potential buffer overflow in Mod_StudioTexName
* Model names are 64 bytes wide, adding texture character means we needs 65 byte wide string. * It never gets stored in memory anyway.
This commit is contained in:
@@ -780,7 +780,7 @@ extract texture filename from modelname
|
||||
*/
|
||||
const char *Mod_StudioTexName( const char *modname )
|
||||
{
|
||||
static char texname[MAX_QPATH];
|
||||
static char texname[MAX_QPATH+1];
|
||||
|
||||
Q_strncpy( texname, modname, sizeof( texname ));
|
||||
COM_StripExtension( texname );
|
||||
|
||||
Reference in New Issue
Block a user