[FFmpeg-devel] [PATCH 3/4] avformat/mov: check for EOF inside the infe list parsing loop
James Almer
jamrial at gmail.com
Mon Jul 1 05:40:21 EEST 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/mov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3aa2398386..9f6752b492 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -8580,6 +8580,8 @@ static int mov_read_iinf(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (i = 0; i < entry_count; i++) {
MOVAtom infe;
+ if (avio_feof(pb))
+ return AVERROR_INVALIDDATA;
infe.size = avio_rb32(pb) - 8;
infe.type = avio_rl32(pb);
ret = mov_read_infe(c, pb, infe, i);
--
2.45.2
More information about the ffmpeg-devel
mailing list