[FFmpeg-cvslog] cdgraphics: initialize buffer

Michael Niedermayer git at videolan.org
Mon May 13 14:54:54 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 13 14:39:00 2013 +0200| [f9db2fc84d3d061720ceb8e1b7425b48bdb1a119] | committer: Michael Niedermayer

cdgraphics: initialize buffer

Prevent use of uninitialized memory

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9db2fc84d3d061720ceb8e1b7425b48bdb1a119
---

 libavcodec/cdgraphics.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index ed2edfe..d292317 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;
 



More information about the ffmpeg-cvslog mailing list