ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Thu Mar 21 00:37:16 
2024 +0100| [0a693bce6216d6fc3ea8dc2986122d5014992d52] | committer: Michael 
Niedermayer

avformat/iamf_parse: keep count_label consistent on language_label allocation 
failure

Fixes: null pointer dereference
Fixes: 
67023/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6011025237278720

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

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

diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c
index bda1580bbd..3867adb117 100644
--- a/libavformat/iamf_parse.c
+++ b/libavformat/iamf_parse.c
@@ -822,6 +822,7 @@ static int mix_presentation_obu(void *s, IAMFContext *c, 
AVIOContext *pb, int le
     mix_presentation->language_label = av_calloc(mix_presentation->count_label,
                                                  
sizeof(*mix_presentation->language_label));
     if (!mix_presentation->language_label) {
+        mix_presentation->count_label = 0;
         ret = AVERROR(ENOMEM);
         goto fail;
     }

_______________________________________________
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