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

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-08 19:33:39 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-07-08 19:33:39 +0400
commit7c7441b37de1b2753062251464072cc766fa7904 (patch)
treef12d7cdf797162e1415970dd6f730ad11fd46bce
parentfe4c76b3d09fb1d93efd438fac35ef16324d40cb (diff)
avcodec/roqvideoenc: check dimensions against maximum
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/roqvideoenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 6530ec7d38..a950a4e865 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -972,6 +972,11 @@ static av_cold int roq_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
+ if (avctx->width > 65535 || avctx->height > 65535) {
+ av_log(avctx, AV_LOG_ERROR, "Dimensions are max 32768\n");
+ return AVERROR(EINVAL);
+ }
+
if (((avctx->width)&(avctx->width-1))||((avctx->height)&(avctx->height-1)))
av_log(avctx, AV_LOG_ERROR, "Warning: dimensions not power of two\n");