diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-07 21:16:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-16 23:38:43 +0100 |
commit | e9a335150a62bb377a26ce096187b4476145d02b (patch) | |
tree | f6afb6450e65948c6702a1bfbcf0f3f500a8f709 | |
parent | ef466a8b29f80ab0bfb5b20757017e3553711f94 (diff) |
avformat/mp3dec: Check that the frame fits within the probe buffer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mp3dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 6888c88f83..4fde920caf 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -89,7 +89,7 @@ static int mp3_read_probe(const AVProbeData *p) header = AV_RB32(buf2); ret = avpriv_mpegaudio_decode_header(&h, header); - if (ret != 0) + if (ret != 0 || end - buf2 < h.frame_size) break; buf2 += h.frame_size; framesizes += h.frame_size; |