mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mp3dec: Check that the frame fits within the probe buffer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ef466a8b29
commit
e9a335150a
|
@ -89,7 +89,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;
|
||||||
|
|
Loading…
Reference in New Issue