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:
parent
bf31e9f634
commit
87840ce91d
1 changed files with 1 additions and 1 deletions
|
@ -780,7 +780,7 @@ extract texture filename from modelname
|
||||||
*/
|
*/
|
||||||
const char *Mod_StudioTexName( const char *modname )
|
const char *Mod_StudioTexName( const char *modname )
|
||||||
{
|
{
|
||||||
static char texname[MAX_QPATH];
|
static char texname[MAX_QPATH+1];
|
||||||
|
|
||||||
Q_strncpy( texname, modname, sizeof( texname ));
|
Q_strncpy( texname, modname, sizeof( texname ));
|
||||||
COM_StripExtension( texname );
|
COM_StripExtension( texname );
|
||||||
|
|
Loading…
Add table
Reference in a new issue