[FFmpeg-cvslog] avcodec/roqvideoenc: check dimensions against maximum
Michael Niedermayer
git at videolan.org
Tue Jul 8 17:44:49 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 8 17:33:39 2014 +0200| [7c7441b37de1b2753062251464072cc766fa7904] | committer: Michael Niedermayer
avcodec/roqvideoenc: check dimensions against maximum
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c7441b37de1b2753062251464072cc766fa7904
---
libavcodec/roqvideoenc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 6530ec7..a950a4e 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");
More information about the ffmpeg-cvslog
mailing list