aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2012-05-14 19:45:41 +0200
committerReinhard Tartler <siretart@tauware.de>2013-01-05 00:27:34 +0100
commitc55ca98769759ceb8aa56854caa405a0f73ac1a4 (patch)
tree81044bba519e667ac8603968788ed245c76185fe
parente5ea6539d484d399291ad2731eb87abbc8c2f7cf (diff)
downloadffmpeg-c55ca98769759ceb8aa56854caa405a0f73ac1a4.tar.gz
indeo3: when freeing buffers, set pointers referencing them to NULL as well
Related to CVE-2012-2804 (cherry picked from commit bc00da27010ed9e5dbe47e5b6fae3dcddb999d78) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavcodec/indeo3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 63517c67d0..48e5810e69 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -207,6 +207,7 @@ static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx)
for (p = 0; p < 3; p++) {
av_freep(&ctx->planes[p].buffers[0]);
av_freep(&ctx->planes[p].buffers[1]);
+ ctx->planes[p].pixels[0] = ctx->planes[p].pixels[1] = 0;
}
}