X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fjvdec.c;h=9c4a8d4ca3c48df051ddaca531e6e0c1436f8822;hp=47e8edcae60bd83f73476d0d75f46e51327e13a7;hb=092a91210f1b986dc846dc52988518f8f913eb72;hpb=dcebb6f35d810c9009a455808b016c790bb633b4 diff --git a/ffmpeg/libavcodec/jvdec.c b/ffmpeg/libavcodec/jvdec.c index 47e8edc..9c4a8d4 100644 --- a/ffmpeg/libavcodec/jvdec.c +++ b/ffmpeg/libavcodec/jvdec.c @@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx) { JvContext *s = avctx->priv_data; + if (!avctx->width || !avctx->height || + (avctx->width & 7) || (avctx->height & 7)) { + av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n", + avctx->width, avctx->height); + return AVERROR(EINVAL); + } + s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM);