[FFmpeg-devel] [PATCH] avformat/oggdec: Check for EOF after page header
Michael Niedermayer
michael at niedermayer.cc
Wed Apr 1 22:29:14 EEST 2020
Fixes: Infinite loop
Fixes: Ticket8594
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/oggdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index de2f24b967..95190589ab 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -389,6 +389,9 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
avio_skip(bc, 8); /* seq, crc */
nsegs = avio_r8(bc);
+ if (avio_feof(bc))
+ return AVERROR_EOF;
+
idx = ogg_find_stream(ogg, serial);
if (idx < 0) {
if (data_packets_seen(ogg))
--
2.17.1
More information about the ffmpeg-devel
mailing list