aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-22 00:34:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-23 23:21:13 +0200
commit586f6fda1d814f0ddc32e652fde5e203d552f6d0 (patch)
tree2cbdf0d71c1385ce74dc6d142038b8f339d3e2fa /libavformat/mov.c
parent55af81b5a4127640ff27336cc7caa2ab164e2446 (diff)
downloadffmpeg-586f6fda1d814f0ddc32e652fde5e203d552f6d0.tar.gz
avformat/mov: add an EOF check in IPRP
Fixes: Timeout Fixes: 69230/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6540512101203968 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 dfe056660a..b74e43e214 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -8938,6 +8938,11 @@ static int mov_read_iprp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
int item_id = version ? avio_rb32(pb) : avio_rb16(pb);
int assoc_count = avio_r8(pb);
+ if (avio_feof(pb)) {
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
for (int j = 0; j < assoc_count; j++) {
MOVAtoms *ref;
int index = avio_r8(pb) & 0x7f;