mirror of https://git.ffmpeg.org/ffmpeg.git
indeo5: update AVCodecContext width/height on size change
Fixes CVE-2012-2787 Note that in 0.7, there is only indeo 5, no indeo 4 decoder Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commitb146d74730
) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit2bc1e4fcb9
) Conflicts: libavcodec/ivi_common.c
This commit is contained in:
parent
c10582e703
commit
b6783b8826
|
@ -798,6 +798,7 @@ static int 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 (avctx->get_buffer(avctx, &ctx->frame) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue