[FFmpeg-cvslog] avformat/mov: add an EOF check in IPRP
Michael Niedermayer
git at videolan.org
Wed Jul 24 00:24:10 EEST 2024
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun 22 00:34:28 2024 +0200| [586f6fda1d814f0ddc32e652fde5e203d552f6d0] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=586f6fda1d814f0ddc32e652fde5e203d552f6d0
---
libavformat/mov.c | 5 +++++
1 file changed, 5 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list