Browse code

cdgraphics: initialize buffer

Prevent use of uninitialized memory

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

Michael Niedermayer authored on 2013/05/13 21:39:00
Showing 1 changed files
... ...
@@ -265,7 +265,7 @@ static int cdg_decode_frame(AVCodecContext *avctx,
265 265
     int buf_size       = avpkt->size;
266 266
     int ret;
267 267
     uint8_t command, inst;
268
-    uint8_t cdg_data[CDG_DATA_SIZE];
268
+    uint8_t cdg_data[CDG_DATA_SIZE] = {0};
269 269
     AVFrame *frame = data;
270 270
     CDGraphicsContext *cc = avctx->priv_data;
271 271