[FFmpeg-cvslog] wvdec: check for eof in wv_read_block_header()
Paul B Mahol
git at videolan.org
Mon Aug 18 13:31:20 CEST 2014
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Aug 18 11:00:24 2014 +0000| [3dca5a5c41f67a2e149582f3d46a09647b183e71] | committer: Paul B Mahol
wvdec: check for eof in wv_read_block_header()
Fixes Ticket #3865
Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3dca5a5c41f67a2e149582f3d46a09647b183e71
---
libavformat/wvdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c
index 5a8d9c7..76768cd 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);
More information about the ffmpeg-cvslog
mailing list