diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-05 19:26:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-17 20:35:19 +0200 |
commit | 2871d8dbb57b9398f9486474e5885e126b91bafd (patch) | |
tree | 044b9a46fdbcd5c9a8f2b3d6a7db9dd1717f2a20 | |
parent | add1e9c371f396c46314c7eb68207a3023165d84 (diff) | |
download | ffmpeg-2871d8dbb57b9398f9486474e5885e126b91bafd.tar.gz |
avcodec/cdxl: Fix signed integer overflow: 14243456 * 164 cannot be represented in type 'int'
Fixes: 1341/clusterfuzz-testcase-minimized-5441502618583040
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 1002932a3b16d35c46a08455f76462909eebb5aa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/cdxl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 50d514b25d..5958efeee3 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -252,7 +252,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, aligned_width = FFALIGN(c->avctx->width, 16); c->padded_bits = aligned_width - c->avctx->width; - if (c->video_size < aligned_width * avctx->height * c->bpp / 8) + if (c->video_size < aligned_width * avctx->height * (int64_t)c->bpp / 8) return AVERROR_INVALIDDATA; if (!encoding && c->palette_size && c->bpp <= 8) { avctx->pix_fmt = AV_PIX_FMT_PAL8; |