aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-14 20:04:05 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-29 09:27:32 +0200
commitb146d74730ab9ec5abede9066f770ad851e45fbc (patch)
treee4ce342c56663f068f3b3deba18ae18549c9ae39
parentee715f49a06bf3898246d01b056284a9bb1bcbb9 (diff)
downloadffmpeg-b146d74730ab9ec5abede9066f770ad851e45fbc.tar.gz
indeo4: update AVCodecContext width/height on size change
Fixes CVE-2012-2787 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/ivi_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 5ebbf56d3c..6ff0f8028b 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -780,6 +780,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
avctx->release_buffer(avctx, &ctx->frame);
ctx->frame.reference = 0;
+ avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return result;