From f9db2fc84d3d061720ceb8e1b7425b48bdb1a119 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 13 May 2013 14:39:00 +0200 Subject: [PATCH] cdgraphics: initialize buffer Prevent use of uninitialized memory Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavcodec/cdgraphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index ed2edfe450..d29231758a 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -265,7 +265,7 @@ static int cdg_decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; int ret; uint8_t command, inst; - uint8_t cdg_data[CDG_DATA_SIZE]; + uint8_t cdg_data[CDG_DATA_SIZE] = {0}; AVFrame *frame = data; CDGraphicsContext *cc = avctx->priv_data;