X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fxwddec.c;h=64cd8418a2083ef2b54db1b476e049efeebc0413;hb=fe71fde24685b5da052f38c9cd3522714de6d6ab;hp=2febedc4aa5c4fd440c8cfb04270519a373faea2;hpb=d6322710c5ec51086aefef9037311922c7aa646c;p=ffmpeg diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 2febedc4aa5..64cd8418a20 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -141,7 +141,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } - if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + avctx->height * lsize) { + if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + (uint64_t)avctx->height * lsize) { av_log(avctx, AV_LOG_ERROR, "input buffer too small\n"); return AVERROR_INVALIDDATA; }