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>
release/7.1
Michael Niedermayer 4 months ago
parent 5c8523cef1
commit 167bf8f61e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 5
      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]; st = c->fc->streams[c->fc->nb_streams - 1];
sc = st->priv_data; 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)); sc->iamf = av_mallocz(sizeof(*sc->iamf));
if (!sc->iamf) if (!sc->iamf)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);

Loading…
Cancel
Save