mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mov: Check for duplicate mdcv
Fixes: memleak
Fixes: 34932/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5456227658235904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f54d85cee6
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f747fd6d6f
commit
95a86b7fc9
|
@ -5368,7 +5368,7 @@ static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||||
|
|
||||||
sc = c->fc->streams[c->fc->nb_streams - 1]->priv_data;
|
sc = c->fc->streams[c->fc->nb_streams - 1]->priv_data;
|
||||||
|
|
||||||
if (atom.size < 24) {
|
if (atom.size < 24 || sc->mastering) {
|
||||||
av_log(c->fc, AV_LOG_ERROR, "Invalid Mastering Display Color Volume box\n");
|
av_log(c->fc, AV_LOG_ERROR, "Invalid Mastering Display Color Volume box\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue