Browse Source

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>
(cherry picked from commit b146d74730)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
tags/n0.10.6
Michael Niedermayer Reinhard Tartler 14 years ago
parent
commit
2bc1e4fcb9
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/ivi_common.c

+ 1
- 0
libavcodec/ivi_common.c View File

@@ -823,6 +823,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;


Loading…
Cancel
Save