Merge commit '03dba25a4001495226651068232b4c6b1e75fd02' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Dec 2014 03:29:22 +0000 (04:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Dec 2014 03:29:22 +0000 (04:29 +0100)
* commit '03dba25a4001495226651068232b4c6b1e75fd02':
  mmvideo: check frame dimensions

Conflicts:
libavcodec/mmvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mmvideo.c

@@@ -60,8 -60,14 +60,15 @@@ static av_cold int mm_decode_init(AVCod
  
      avctx->pix_fmt = AV_PIX_FMT_PAL8;
  
 -    s->frame.reference = 1;
+     if (!avctx->width || !avctx->height ||
+         (avctx->width & 1) || (avctx->height & 1)) {
+         av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
+                avctx->width, avctx->height);
+         return AVERROR(EINVAL);
+     }
 +    avcodec_get_frame_defaults(&s->frame);
 +    s->frame.reference = 3;
  
      return 0;
  }