Commit 1002932a authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f55df629
......@@ -275,7 +275,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
else
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;
......
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