Commit e6003756 authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf

SMF: avoid a DOS if the SMF header is invalid

Reported by Marcin 'Icewall' Noga from Hispasec
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 43563679
......@@ -209,7 +209,13 @@ static int Open (vlc_object_t * p_this)
for (;;)
{
stream_Read (stream, head, 8);
if (stream_Read (stream, head, 8) < 8)
{
/* FIXME: don't give up if we have at least one valid track */
msg_Err (p_this, "incomplete SMF chunk, file is corrupted");
goto error;
}
if (memcmp (head, "MTrk", 4) == 0)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment