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:
Alibek Omarov
2025-10-30 17:31:08 +05:00
parent 21ea83027e
commit 6a9f61e69f

View File

@@ -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;