diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-04-30 18:06:53 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-04-30 18:06:53 +0200 |
commit | 675cfb2f86a0bd76b0784da0c7ec9a9225e37353 (patch) | |
tree | ceec5b662f9a656eac8136fb749994b82683bd50 | |
parent | d171cd076f611b70a9d2e08bc261b470affcb932 (diff) | |
download | ffmpeg-675cfb2f86a0bd76b0784da0c7ec9a9225e37353.tar.gz |
avformat/iff: fix deadlock in parsing dsd chunks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/iff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index 4f1158161d..8b8bf01868 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -209,7 +209,7 @@ static int parse_dsd_diin(AVFormatContext *s, AVStream *st, uint64_t eof) { AVIOContext *pb = s->pb; - while (avio_tell(pb) + 12 <= eof) { + while (avio_tell(pb) + 12 <= eof && !avio_feof(pb)) { uint32_t tag = avio_rl32(pb); uint64_t size = avio_rb64(pb); uint64_t orig_pos = avio_tell(pb); @@ -243,7 +243,7 @@ static int parse_dsd_prop(AVFormatContext *s, AVStream *st, uint64_t eof) int dsd_layout[6]; ID3v2ExtraMeta *id3v2_extra_meta; - while (avio_tell(pb) + 12 <= eof) { + while (avio_tell(pb) + 12 <= eof && !avio_feof(pb)) { uint32_t tag = avio_rl32(pb); uint64_t size = avio_rb64(pb); uint64_t orig_pos = avio_tell(pb); |