aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 22:31:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 22:31:40 +0100
commit8439378f41e34737499858eff8bafb930aee50ca (patch)
treee7618aec84226e64ccf23fc574de0b8ddb018c6c
parent17f094697db962e2b4b0aba62f31052c54dfb305 (diff)
parentfc159ba88ea2dd1fa11e4ab6af8b574fc80db454 (diff)
downloadffmpeg-8439378f41e34737499858eff8bafb930aee50ca.tar.gz
Merge commit 'fc159ba88ea2dd1fa11e4ab6af8b574fc80db454' into release/0.10
* commit 'fc159ba88ea2dd1fa11e4ab6af8b574fc80db454': mmvideo: check frame dimensions Conflicts: libavcodec/mmvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mmvideo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 1f1703c7e3..21d6669327 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -60,6 +60,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_PAL8;
+ 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;