[FFmpeg-cvslog] avcodec/vp9: assert on sane size in update_size().
Clément Bœsch
git at videolan.org
Sat Nov 16 22:49:19 CET 2013
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Nov 16 22:47:32 2013 +0100| [484f8d77c6ecf995ac89d1071d3be0cae1f5326c] | committer: 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 97962b2 / 72ca830, with the
av_log()+AVERROR_INVALIDDATA form, suggesting it could be triggerable
somehow.
Change suggested by Ronald S. Bultje.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=484f8d77c6ecf995ac89d1071d3be0cae1f5326c
---
libavcodec/vp9.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 745bbd6..785b187 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list