Commit 88fe45e0 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/svq1enc: Check dimensions

Fixes assertion failure
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a604289b
......@@ -526,6 +526,11 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
SVQ1EncContext *const s = avctx->priv_data;
int ret;
if (avctx->width >= 4096 || avctx->height >= 4096) {
av_log(avctx, AV_LOG_ERROR, "Dimensions too large, maximum is 4095x4095\n");
return AVERROR(EINVAL);
}
ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_me_cmp_init(&s->mecc, avctx);
ff_mpegvideoencdsp_init(&s->m.mpvencdsp, avctx);
......
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