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>
This commit is contained in:
James Almer 2024-03-21 00:37:16 +01:00 committed by Michael Niedermayer
parent f26ee6e066
commit 0a693bce62
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}