X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdfa.c;h=970175fb734680e6812145c002f95dd54e068623;hb=ed5680f37ed30a01933c0158b21e3bb3c8acfe4a;hp=536040d65c9b8aae2db593724520b45100eff0cc;hpb=1325ac4c93f27dd56ebce37d8045d7ceb64dc645;p=ffmpeg diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 536040d65c9..970175fb734 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -41,7 +41,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; - if (!avctx->width || !avctx->height) + if (!avctx->width || !avctx->height || FFMAX(avctx->width, avctx->height) >= (1<<16)) return AVERROR_INVALIDDATA; av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0);