[FFmpeg-cvslog] avformat/isom: zero MPEG4AudioConfig to avoid leaving fields uninitialized

Michael Niedermayer git at videolan.org
Wed Dec 18 19:47:28 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 18 19:39:05 2013 +0100| [d8b4ba3c5a9cff9fdd36b03d600ad38e09608daf] | committer: Michael Niedermayer

avformat/isom: zero MPEG4AudioConfig to avoid leaving fields uninitialized

Fixes: use of uninitialized memory
Fixes: msan_uninit-mem_7f392c443e0d_1433_Crowd_Applause_01.caf
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=d8b4ba3c5a9cff9fdd36b03d600ad38e09608daf
---

 libavformat/isom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index de9d20c..19ec57b 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -461,7 +461,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
             return AVERROR(ENOMEM);
         avio_read(pb, st->codec->extradata, len);
         if (st->codec->codec_id == AV_CODEC_ID_AAC) {
-            MPEG4AudioConfig cfg;
+            MPEG4AudioConfig cfg = {0};
             avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
                                          st->codec->extradata_size * 8, 1);
             st->codec->channels = cfg.channels;



More information about the ffmpeg-cvslog mailing list