diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-04-01 22:56:02 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-04-02 20:20:04 -0300 |
commit | d157725cf726adc29385d264eaf79ae430b1f3e5 (patch) | |
tree | 4036e001bc6427267031d62cbfbf12df0c9aeab0 | |
parent | e3984de6ffd6068efcfb5c576f1ec788211608fe (diff) | |
download | ffmpeg-d157725cf726adc29385d264eaf79ae430b1f3e5.tar.gz |
avformat/isom: Uninit layout in ff_mp4_read_dec_config_descr()
Fixes: memleak
Fixes: 67442/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5068813261406208
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/isom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c index 9fbccd4437..c5930bd4d8 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -359,6 +359,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext st->codecpar->extradata_size, 1, fc); if (ret < 0) return ret; + av_channel_layout_uninit(&st->codecpar->ch_layout); st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; st->codecpar->ch_layout.nb_channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 |