[FFmpeg-cvslog] avformat/iamf_parse: keep count_label consistent on language_label allocation failure
James Almer
git at videolan.org
Mon Apr 1 19:22:56 EEST 2024
ffmpeg | branch: master | James Almer <jamrial at 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 <michael at 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;
}
More information about the ffmpeg-cvslog
mailing list