Browse code

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit db5b4875514eb7740844f514dbf236c9179a6a93)

Laurent Aimar authored on 2011/10/01 09:04:45
Showing 1 changed files
... ...
@@ -885,6 +885,10 @@ static av_cold int decode_init(AVCodecContext *avctx){
885 885
         av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
886 886
         return 1;
887 887
     }
888
+    if((avctx->width % 16) || (avctx->height % 16)) {
889
+        av_log(avctx, AV_LOG_ERROR, "unsupported width/height\n");
890
+        return AVERROR_INVALIDDATA;
891
+    }
888 892
 
889 893
     avcodec_get_frame_defaults(&f->current_picture);
890 894
     avcodec_get_frame_defaults(&f->last_picture);