diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-08-16 15:36:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-10-23 01:44:40 +0200 |
commit | 0ea54cae21824dab70c1d11a329ea3bbab3538af (patch) | |
tree | bf6bc3b30ffe122ccc06c3d4bc21cad913b65f3c /libavformat | |
parent | f1425b389a3b7d4758d2b1faf97f2624e27c3819 (diff) | |
download | ffmpeg-0ea54cae21824dab70c1d11a329ea3bbab3538af.tar.gz |
avformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()
Fixes: long running loop
Fixes: ivr-timeout-42468cb797f52f025fb329394702f5d4d64322d6
Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c2eec1762d372663c35aaf3d6ee419bafb185057)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rmdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 48420cfd67..e3c8c56e4c 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -1278,6 +1278,8 @@ static int ivr_read_header(AVFormatContext *s) if (avio_rb32(pb) == MKBETAG('M', 'L', 'T', 'I')) { ret = rm_read_multi(s, pb, st, NULL); } else { + if (avio_feof(pb)) + return AVERROR_INVALIDDATA; avio_seek(pb, -4, SEEK_CUR); ret = ff_rm_read_mdpr_codecdata(s, pb, st, st->priv_data, len, NULL); } |