aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-07-18 18:50:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-21 15:29:24 +0200
commit167bf8f61e671833c9d1234f12973e71c414b621 (patch)
tree49b35ef44b1ee771624faea2018f940568a3f12d /libavformat/mov.c
parent5c8523cef11910c4a3713be18ce2084279b817a5 (diff)
downloadffmpeg-167bf8f61e671833c9d1234f12973e71c414b621.tar.gz
avformat/mov: Check extradata in mov_read_iacb()
Fixes: MemLeak Fixes: 69853/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4660448545275904 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/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 20efc74f00..a29283effa 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -898,6 +898,11 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams - 1];
sc = st->priv_data;
+ if (st->codecpar->extradata) {
+ av_log(c->fc, AV_LOG_WARNING, "ignoring iacb\n");
+ return 0;
+ }
+
sc->iamf = av_mallocz(sizeof(*sc->iamf));
if (!sc->iamf)
return AVERROR(ENOMEM);