X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fjvdec.c;h=9c4a8d4ca3c48df051ddaca531e6e0c1436f8822;hb=refs%2Ftags%2Fdebian%2F2.5.2_trusty;hp=47e8edcae60bd83f73476d0d75f46e51327e13a7;hpb=dcebb6f35d810c9009a455808b016c790bb633b4;p=deb_ffmpeg.git 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);