From 6a9f61e69f78a7d850bc52e397231cd94172a6d1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 30 Oct 2025 17:31:08 +0500 Subject: [PATCH] engine: soundlib: ignore TXXX tags that's size exceeds 255 (sizeof( string ) - 1) bytes to account for null terminator Thanks @veygax for the report! --- engine/client/soundlib/snd_mp3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/client/soundlib/snd_mp3.c b/engine/client/soundlib/snd_mp3.c index fe492a69..70a09988 100644 --- a/engine/client/soundlib/snd_mp3.c +++ b/engine/client/soundlib/snd_mp3.c @@ -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;