[FFmpeg-cvslog] avcodec/proresenc_anatoliy: check against maximum dimensions

Michael Niedermayer git at videolan.org
Tue Jul 8 18:10:21 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul  8 18:03:11 2014 +0200| [7cb8f7ded418f5388cc38512d1af96fd1d251cf2] | committer: Michael Niedermayer

avcodec/proresenc_anatoliy: check against maximum dimensions

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cb8f7ded418f5388cc38512d1af96fd1d251cf2
---

 libavcodec/proresenc_anatoliy.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 434021d..b2445ca 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -554,6 +554,12 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
         return -1;
     }
 
+    if (avctx->width > 65534 || avctx->height > 65535) {
+        av_log(avctx, AV_LOG_ERROR,
+                "The maximum dimensions are 65534x65535\n");
+        return AVERROR(EINVAL);
+    }
+
     if ((avctx->height & 0xf) || (avctx->width & 0xf)) {
         ctx->fill_y = av_malloc(4 * (DEFAULT_SLICE_MB_WIDTH << 8));
         if (!ctx->fill_y)



More information about the ffmpeg-cvslog mailing list