Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-24 07:38:17 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-24 07:38:17 +0400
commit7e059c9c5d7885d9c41ddff4449e1b642cb1ec34 (patch)
treec20fb89672c9eec8299d7d5913656c2ce1c2a142 /libavcodec/mpeg4videoenc.c
parent46cb61819d867961e8f2052a8f13bcf2027d484f (diff)
mpeg4videoenc: check w,h to be within the supported range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r--libavcodec/mpeg4videoenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 0cc4df9a07..a07f956af0 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1234,6 +1234,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
int ret;
static int done = 0;
+ if (avctx->width >= (1<<13) || avctx->height >= (1<<13)) {
+ av_log(avctx, AV_LOG_ERROR, "dimensions too large for MPEG-4\n");
+ return AVERROR(EINVAL);
+ }
+
if((ret=ff_MPV_encode_init(avctx)) < 0)
return ret;