Commit 3a91eb37 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mp3dec: Check that the frame fits within the probe buffer

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9a33515)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1c24ab39
...@@ -91,7 +91,7 @@ static int mp3_read_probe(const AVProbeData *p) ...@@ -91,7 +91,7 @@ static int mp3_read_probe(const AVProbeData *p)
header = AV_RB32(buf2); header = AV_RB32(buf2);
ret = avpriv_mpegaudio_decode_header(&h, header); ret = avpriv_mpegaudio_decode_header(&h, header);
if (ret != 0) if (ret != 0 || end - buf2 < h.frame_size)
break; break;
buf2 += h.frame_size; buf2 += h.frame_size;
framesizes += h.frame_size; framesizes += h.frame_size;
......
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