Fix potential buffer overflow caused by long tcMod args

Found by Coverity.
This commit is contained in:
Zack Middleton 2014-05-25 18:44:17 -05:00
parent 9c99cf29db
commit eeeaf3f125
2 changed files with 4 additions and 4 deletions

View file

@ -1010,8 +1010,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
token = COM_ParseExt( text, qfalse );
if ( token[0] == 0 )
break;
strcat( buffer, token );
strcat( buffer, " " );
Q_strcat( buffer, sizeof (buffer), token );
Q_strcat( buffer, sizeof (buffer), " " );
}
ParseTexMod( buffer, stage );

View file

@ -1265,8 +1265,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
token = COM_ParseExt( text, qfalse );
if ( token[0] == 0 )
break;
strcat( buffer, token );
strcat( buffer, " " );
Q_strcat( buffer, sizeof (buffer), token );
Q_strcat( buffer, sizeof (buffer), " " );
}
ParseTexMod( buffer, stage );