ffmpeg | branch: release/5.1 | Michael Niedermayer <mich...@niedermayer.cc> | 
Mon Apr  1 22:56:02 2024 +0200| [6444e7c3c9ec0d8ccf58f4023398603875ba989b] | 
committer: Michael Niedermayer

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 <mich...@niedermayer.cc>
Signed-off-by: James Almer <jamr...@gmail.com>
(cherry picked from commit d157725cf726adc29385d264eaf79ae430b1f3e5)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

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

diff --git a/libavformat/isom.c b/libavformat/isom.c
index cf27f58082..9bf49c84cd 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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to