]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/motionpixels.c
Merge commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a'
[ffmpeg] / libavcodec / motionpixels.c
index 0ff8f3a54f357298e8630968d532e5806235c7dc..fc8d440973e4b5903c27d6505aae5a3fac0035b1 100644 (file)
@@ -55,6 +55,11 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
     int w4 = (avctx->width  + 3) & ~3;
     int h4 = (avctx->height + 3) & ~3;
 
+    if(avctx->extradata_size < 2){
+        av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     motionpixels_tableinit();
     mp->avctx = avctx;
     ff_dsputil_init(&mp->dsp, avctx);