diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-01 20:58:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-03 12:10:24 +0200 |
commit | a99bcee917d63b39e44a175aaa9e647d43d9e779 (patch) | |
tree | c28d7464f17a4d7d6c580b18d9f6ab4b91fd430f /libavformat | |
parent | e55bcedae9b7b4d7fbec581e3ee18fe2d8fd72ca (diff) | |
download | ffmpeg-a99bcee917d63b39e44a175aaa9e647d43d9e779.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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggdec.c | 3 |
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)) |