[FFmpeg-cvslog] avformat/electronicarts: check chunk size.

Michael Niedermayer git at videolan.org
Mon Nov 11 21:34:30 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 11 19:51:12 2013 +0100| [20769d9349ba598822334d666ef1f3e387df2dff] | committer: Michael Niedermayer

avformat/electronicarts: check chunk size.

Fix infinite loop

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/electronicarts.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 97c19c9..3694a02 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -361,6 +361,11 @@ static int process_ea_header(AVFormatContext *s)
         if (ea->big_endian)
             size = av_bswap32(size);
 
+        if (size < 8) {
+            av_log(s, AV_LOG_ERROR, "chunk size too small\n");
+            return AVERROR_INVALIDDATA;
+        }
+
         switch (blockid) {
         case ISNh_TAG:
             if (avio_rl32(pb) != EACS_TAG) {



More information about the ffmpeg-cvslog mailing list