aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-07 15:42:17 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commite9a8242b96d9438b15c7e206b5420ebb89f36b2b (patch)
treeaf97fa29c3317b0855f861f229180740a0fed5e6
parent408b4fb430a0988ab71aa347e79fa487c01d63bf (diff)
downloadffmpeg-e9a8242b96d9438b15c7e206b5420ebb89f36b2b.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index bb0f0053ff..c28fd11d42 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;