[FFmpeg-cvslog] indeo4: update AVCodecContext width/height on size change

Michael Niedermayer git at videolan.org
Sat Sep 29 14:46:47 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 14 20:04:05 2012 +0200| [b146d74730ab9ec5abede9066f770ad851e45fbc] | committer: Anton Khirnov

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 at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b146d74730ab9ec5abede9066f770ad851e45fbc
---

 libavcodec/ivi_common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 5ebbf56..6ff0f80 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;



More information about the ffmpeg-cvslog mailing list