Commit c2eec176 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()

Fixes: long running loop
Fixes: ivr-timeout-42468cb797f52f025fb329394702f5d4d64322d6
Found-by: 's avatarPaul Ch <paulcher@icloud.com>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1e71cb2c
...@@ -1269,6 +1269,8 @@ static int ivr_read_header(AVFormatContext *s) ...@@ -1269,6 +1269,8 @@ static int ivr_read_header(AVFormatContext *s)
if (avio_rb32(pb) == MKBETAG('M', 'L', 'T', 'I')) { if (avio_rb32(pb) == MKBETAG('M', 'L', 'T', 'I')) {
ret = rm_read_multi(s, pb, st, NULL); ret = rm_read_multi(s, pb, st, NULL);
} else { } else {
if (avio_feof(pb))
return AVERROR_INVALIDDATA;
avio_seek(pb, -4, SEEK_CUR); avio_seek(pb, -4, SEEK_CUR);
ret = ff_rm_read_mdpr_codecdata(s, pb, st, st->priv_data, len, NULL); ret = ff_rm_read_mdpr_codecdata(s, pb, st, st->priv_data, len, NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment