ffmpeg | branch: release/3.4 | Michael Niedermayer <mich...@niedermayer.cc> | 
Thu Nov  7 21:16:32 2019 +0100| [0a4d2b5f674ed1b4632b550d9a176de05fab7a16] | 
committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit e9a335150a62bb377a26ce096187b4476145d02b)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a4d2b5f674ed1b4632b550d9a176de05fab7a16
---

 libavformat/mp3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
         }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to