diff options
author | Paul B Mahol <onemda@gmail.com> | 2014-08-18 11:00:24 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2014-08-18 11:30:35 +0000 |
commit | 3dca5a5c41f67a2e149582f3d46a09647b183e71 (patch) | |
tree | 6d23449f684edba925a2374b9e1fc0ee4e6f51e9 | |
parent | 90b2f3136778311fb5e097b8ee1f527518231c23 (diff) | |
download | ffmpeg-3dca5a5c41f67a2e149582f3d46a09647b183e71.tar.gz |
wvdec: check for eof in wv_read_block_header()
Fixes Ticket #3865
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/wvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c index 5a8d9c72e6..76768cdf26 100644 --- a/libavformat/wvdec.c +++ b/libavformat/wvdec.c @@ -124,7 +124,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb) "Cannot determine additional parameters\n"); return AVERROR_INVALIDDATA; } - while (avio_tell(pb) < block_end) { + while (avio_tell(pb) < block_end && !avio_feof(pb)) { int id, size; id = avio_r8(pb); size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb); |