aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-01 20:58:52 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 13:33:44 +0200
commitb26458b046b42f8baf65a990e98d50d329314621 (patch)
tree132e7662bf1324500127cf8f24f0dd1a3e44899b
parent15e323fee171ddf8e6828a70b2ff38e55109a5b8 (diff)
downloadffmpeg-b26458b046b42f8baf65a990e98d50d329314621.tar.gz
avformat/oggdec: Check for EOF after page header
Fixes: Infinite loop Fixes: Ticket8594 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit f1589be9fda00c417f9bcccb55dbbea998ee08ac) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/oggdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 81cfb3c243..c31ebc2d10 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))