1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Paul B Mahol 2014-08-18 11:00:24 +00:00
parent 90b2f31367
commit 3dca5a5c41

View File

@ -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);