aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-05 19:26:02 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commit0f6f16392208f9ace447e1831cb50a3705f2fe12 (patch)
tree930b64b50b48dd679235eb7a16b46ad501d58cbe
parentdb8f28fd3f8b2aa250f3440e684ca3c05ae19c4c (diff)
downloadffmpeg-0f6f16392208f9ace447e1831cb50a3705f2fe12.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index c8d66b5845..7a9b41943d 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -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;