[FFmpeg-cvslog] avcodec/svq1enc: Check dimensions
Michael Niedermayer
git at videolan.org
Thu Nov 26 17:54:51 CET 2015
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug 15 14:54:36 2015 +0200| [0bdf0cfa00e58c6f10cc017e75aa0c8aefd94229] | committer: Michael Niedermayer
avcodec/svq1enc: Check dimensions
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 88fe45e0fe379d7ea86c8ac1e1e8cf2c3f62389f)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0bdf0cfa00e58c6f10cc017e75aa0c8aefd94229
---
libavcodec/svq1enc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 2a0d780..493027d 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -514,6 +514,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);
More information about the ffmpeg-cvslog
mailing list