diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-07 21:16:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-21 23:27:24 +0100 |
commit | 0a4d2b5f674ed1b4632b550d9a176de05fab7a16 (patch) | |
tree | 4bd75ae6f66c0eb1562cd09b69daed42ea40ec73 | |
parent | 6e208e78d365ffe775cc6e772a82d3cabc5ba4c8 (diff) | |
download | ffmpeg-0a4d2b5f674ed1b4632b550d9a176de05fab7a16.tar.gz |
avformat/mp3dec: Check that the frame fits within the probe buffer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9a335150a62bb377a26ce096187b4476145d02b)
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 a5c4f2ea12..7720a8c19f 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -89,7 +89,7 @@ static int mp3_read_probe(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; } |