Message ID | 20211203171956.12231-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | b5ba74053c1ef9f38d9e7b3a036675f06d2b2714 |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/mov: Disallow duplicate smdm | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
On Fri, Dec 03, 2021 at 06:19:53PM +0100, Michael Niedermayer wrote: > Fixes: memleak > Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/mov.c | 3 +++ > 1 file changed, 3 insertions(+) will apply [...]
diff --git a/libavformat/mov.c b/libavformat/mov.c index 5c74d099dae..e34453432d3 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5405,6 +5405,9 @@ static int mov_read_smdm(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_WARNING, "Unsupported Mastering Display Metadata box version %d\n", version); return 0; } + if (sc->mastering) + return AVERROR_INVALIDDATA; + avio_skip(pb, 3); /* flags */ sc->mastering = av_mastering_display_metadata_alloc();
Fixes: memleak Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+)