Commit 0ac1c871 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/eamad: Fix runtime error: signed integer overflow: 49674 * 49858...

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c04aa148
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment