mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: soundlib: ignore TXXX tags that's size exceeds 255 (sizeof( string ) - 1) bytes to account for null terminator
Thanks @veygax for the report!
This commit is contained in:
@@ -89,7 +89,7 @@ static qboolean Sound_ParseID3Frame( const did3v2_frame_t *frame, const byte *bu
|
||||
{
|
||||
key_len = Q_strncpy( key, &buffer[1], sizeof( key ));
|
||||
value_len = frame_length - (1 + key_len + 1);
|
||||
if( value_len <= 0 || value_len >= sizeof( value ))
|
||||
if( value_len <= 0 || value_len >= sizeof( value ) - 1 )
|
||||
{
|
||||
Con_Printf( S_ERROR "%s: invalid TXXX description, possibly broken file.\n", __func__ );
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user