Commit f346e37a authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '88626e5a'

* commit '88626e5a':
  jvdec: check frame dimensions

See: 105654e3Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 6c68522a 88626e5a
...@@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
{ {
JvContext *s = avctx->priv_data; 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(); s->frame = av_frame_alloc();
if (!s->frame) if (!s->frame)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment