Merge commit '954aafaa961c32c655ad38fb622e8cbe249ebd5a' into release/0.10

* commit '954aafaa961c32c655ad38fb622e8cbe249ebd5a':
  jvdec: check frame dimensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-11 22:20:49 +01:00
commit 17f094697d
1 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
JvContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
dsputil_init(&s->dsp, avctx);
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);
}
return 0;
}