diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-07 15:42:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-17 20:35:20 +0200 |
commit | d93c75f037a81bc81c1b74440be88bc37703f01e (patch) | |
tree | 2be116bcc7a2e3ded4476f295109aa3cfaef9c2a | |
parent | 87c1cff598912805fed2c7edfbae193ff49b2434 (diff) | |
download | ffmpeg-d93c75f037a81bc81c1b74440be88bc37703f01e.tar.gz |
avcodec/eamad: Fix runtime error: signed integer overflow: 49674 * 49858 cannot be represented in type 'int'
Fixes: 1394/clusterfuzz-testcase-minimized-6493376885030912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0ac1c87194a67e6104a3d241a4dd1ca0808784bd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/eamad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 4e202f98a3..0525394838 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -284,7 +284,7 @@ static int decode_frame(AVCodecContext *avctx, if (avctx->width != width || avctx->height != height) { av_frame_unref(s->last_frame); - if((width * height)/2048*7 > bytestream2_get_bytes_left(&gb)) + if((width * (int64_t)height)/2048*7 > bytestream2_get_bytes_left(&gb)) return AVERROR_INVALIDDATA; if ((ret = ff_set_dimensions(avctx, width, height)) < 0) return ret; |