[FFmpeg-cvslog] 4xm: Reject not a multiple of 16 dimension
Luca Barbato
git at videolan.org
Mon Nov 4 18:04:20 CET 2013
ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Mon Jul 22 12:44:19 2013 +0200| [c25bbb6fdbfb7332af302e0366fc2c2d60b44c72] | committer: Luca Barbato
4xm: Reject not a multiple of 16 dimension
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit 2f034f255c49050e894ab9b88087c09ebe249f3f)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c25bbb6fdbfb7332af302e0366fc2c2d60b44c72
---
libavcodec/4xm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 3d026fe..159ca9c 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -750,6 +750,12 @@ static int decode_frame(AVCodecContext *avctx,
if (buf_size < 20)
return AVERROR_INVALIDDATA;
+ if (avctx->width % 16 || avctx->height % 16) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Dimensions non-multiple of 16 are invalid.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (buf_size < AV_RL32(buf + 4) + 8) {
av_log(f->avctx, AV_LOG_ERROR,
"size mismatch %d %d\n", buf_size, AV_RL32(buf + 4));
More information about the ffmpeg-cvslog
mailing list