[FFmpeg-cvslog] Reject video with non multiple of 16 width/height in the 4xm decoder.

Laurent Aimar git at videolan.org
Sun Oct 2 17:03:47 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Oct  1 02:04:45 2011 +0200| [db5b4875514eb7740844f514dbf236c9179a6a93] | committer: Michael Niedermayer

Reject video with non multiple of 16 width/height in the 4xm decoder.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db5b4875514eb7740844f514dbf236c9179a6a93
---

 libavcodec/4xm.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 94cfb82..f2a8257 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -885,6 +885,10 @@ static av_cold int decode_init(AVCodecContext *avctx){
         av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
         return 1;
     }
+    if((avctx->width % 16) || (avctx->height % 16)) {
+        av_log(avctx, AV_LOG_ERROR, "unsupported width/height\n");
+        return AVERROR_INVALIDDATA;
+    }
 
     avcodec_get_frame_defaults(&f->current_picture);
     avcodec_get_frame_defaults(&f->last_picture);



More information about the ffmpeg-cvslog mailing list