cdgraphics: initialize buffer
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 May 2013 12:39:00 +0000 (14:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 13 May 2013 12:39:32 +0000 (14:39 +0200)
Prevent use of uninitialized memory

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/cdgraphics.c

index ed2edfe..d292317 100644 (file)
@@ -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;