Commit 484f8d77 authored by Clément Bœsch's avatar Clément Bœsch

avcodec/vp9: assert on sane size in update_size().

w and h are both read as uint16 + 1 so this can not happen. A similar
change was introduced in 97962b27 / 72ca830f, with the
av_log()+AVERROR_INVALIDDATA form, suggesting it could be triggerable
somehow.

Change suggested by Ronald S. Bultje.
parent c20a7ce6
......@@ -243,6 +243,8 @@ static int update_size(AVCodecContext *ctx, int w, int h)
VP9Context *s = ctx->priv_data;
uint8_t *p;
av_assert0(w > 0 && h > 0);
if (s->above_partition_ctx && w == ctx->width && h == ctx->height)
return 0;
......
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