aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-08 18:03:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-08 18:03:11 +0200
commit7cb8f7ded418f5388cc38512d1af96fd1d251cf2 (patch)
treea1b57d38374d780a96e31a2e4aa3a11bc58eb64e
parent7c7441b37de1b2753062251464072cc766fa7904 (diff)
downloadffmpeg-7cb8f7ded418f5388cc38512d1af96fd1d251cf2.tar.gz
avcodec/proresenc_anatoliy: check against maximum dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/proresenc_anatoliy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 434021d6a6..b2445cabab 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)