aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-21 04:29:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-21 04:29:22 +0100
commit9bbe24d455a35a91e3b19303922ce4d58fa8d4ad (patch)
treee5dd1670f1638af954e2748f461f77e777d133ee
parent6e5dd43bf9099a72de04ccc8a65dd1c4939aed92 (diff)
parent03dba25a4001495226651068232b4c6b1e75fd02 (diff)
downloadffmpeg-9bbe24d455a35a91e3b19303922ce4d58fa8d4ad.tar.gz
Merge commit '03dba25a4001495226651068232b4c6b1e75fd02' into release/1.1
* commit '03dba25a4001495226651068232b4c6b1e75fd02': 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 b74424cc13..91aca94e7e 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 = AV_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;