You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
avformat/iamfdec: Check nb_layers before dereferencing layer
Fixes: dereferencing pointers near NULL Fixes: 70432/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-5255672845893632 Fixes: 70877/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-5348547432611840 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:
@@ -107,7 +107,7 @@ static int iamf_read_header(AVFormatContext *s)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!i && !j && audio_element->layers[0].substream_count == 1)
|
if (!i && !j && audio_element->nb_layers && audio_element->layers[0].substream_count == 1)
|
||||||
st->disposition |= AV_DISPOSITION_DEFAULT;
|
st->disposition |= AV_DISPOSITION_DEFAULT;
|
||||||
else
|
else
|
||||||
st->disposition |= AV_DISPOSITION_DEPENDENT;
|
st->disposition |= AV_DISPOSITION_DEPENDENT;
|
||||||
|
|||||||
Reference in New Issue
Block a user