diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-01 20:58:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-23 21:29:01 +0200 |
commit | b4ac1972576eee8cb84f2461eec10cc5e95c90d3 (patch) | |
tree | 47a91d181f9a46ed9ec3c245dfff2eec568b6014 /libavformat | |
parent | 1ff19987bede863bd522f67e2efd2c3f7fae56de (diff) | |
download | ffmpeg-b4ac1972576eee8cb84f2461eec10cc5e95c90d3.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 7ace0d1c16..91357dc922 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -369,6 +369,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)) |