aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-01 20:58:52 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-12 16:36:47 +0200
commitf1589be9fda00c417f9bcccb55dbbea998ee08ac (patch)
treeceded6b9246d5fd449bee82911d70af02a5dac67
parentbe3c29e3795cb2499e3b96335286d6a8423c0bcf (diff)
downloadffmpeg-f1589be9fda00c417f9bcccb55dbbea998ee08ac.tar.gz
avformat/oggdec: Check for EOF after page header
Fixes: Infinite loop Fixes: Ticket8594 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 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))