Commit 3dca5a5c authored by Paul B Mahol's avatar Paul B Mahol

wvdec: check for eof in wv_read_block_header()

Fixes Ticket #3865
Found-by: 's avatarPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 90b2f313
...@@ -124,7 +124,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb) ...@@ -124,7 +124,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
"Cannot determine additional parameters\n"); "Cannot determine additional parameters\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
while (avio_tell(pb) < block_end) { while (avio_tell(pb) < block_end && !avio_feof(pb)) {
int id, size; int id, size;
id = avio_r8(pb); id = avio_r8(pb);
size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb); size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb);
......
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