Browse Source

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@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
d8b4ba3c5a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/isom.c

+ 1
- 1
libavformat/isom.c View File

@@ -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;


Loading…
Cancel
Save