diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-11 19:51:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-11 19:51:12 +0100 |
commit | 20769d9349ba598822334d666ef1f3e387df2dff (patch) | |
tree | 5c88be4ee942041ff1ef492622181972b0c336a4 | |
parent | bdab2421a540efc0593c87e6d247427a0a6e16bc (diff) | |
download | ffmpeg-20769d9349ba598822334d666ef1f3e387df2dff.tar.gz |
avformat/electronicarts: check chunk size.
Fix infinite loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/electronicarts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 97c19c932a..3694a02176 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) { |