diff mbox series

[FFmpeg-devel,2/9] avformat/mov: Limit nb_chapter_tracks to input size

Message ID 20210419182346.4445-2-michael@niedermayer.cc
State Accepted
Commit 299a56c9006b2eb8807c3e3efefb91a78fe6b3b2
Headers show
Series [FFmpeg-devel,1/9] avformat/utils: check dts/duration to be representable before using them
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer April 19, 2021, 6:23 p.m. UTC
Fixes: Timeout (15k loop iterations instead of 400m)
Fixes: 31368/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6601583174483968

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 | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer May 12, 2021, 8:53 p.m. UTC | #1
On Mon, Apr 19, 2021 at 08:23:39PM +0200, Michael Niedermayer wrote:
> Fixes: Timeout (15k loop iterations instead of 400m)
> Fixes: 31368/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6601583174483968
> 
> 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 | 2 ++
>  1 file changed, 2 insertions(+)

will apply

[...]
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9ca1ac89a8..add1e94641 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4687,6 +4687,8 @@  static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     for (i = 0; i < num && !pb->eof_reached; i++)
         c->chapter_tracks[i] = avio_rb32(pb);
 
+    c->nb_chapter_tracks = i;
+
     return 0;
 }