diff options
author | James Almer <jamrial@gmail.com> | 2024-03-21 00:37:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-04-01 18:17:28 +0200 |
commit | 0a693bce6216d6fc3ea8dc2986122d5014992d52 (patch) | |
tree | fbaba8b7d65d58f96ab0c3b9767523a97d74eb2e /libavformat | |
parent | f26ee6e0667d050b684668ad0e792e70fcf88b78 (diff) | |
download | ffmpeg-0a693bce6216d6fc3ea8dc2986122d5014992d52.tar.gz |
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@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/iamf_parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |