[FFmpeg-cvslog] avformat/vqf: check avio_read()s return value more completely
Michael Niedermayer
git at videolan.org
Wed Jan 1 16:55:54 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 1 15:29:20 2014 +0100| [06bb1de1c78a3653e197ff3434d550499b556e72] | committer: Michael Niedermayer
avformat/vqf: check avio_read()s return value more completely
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f180a523a71_5052_esvorbei_extd.vqf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06bb1de1c78a3653e197ff3434d550499b556e72
---
libavformat/vqf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 526b596..74c7f5f 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -249,7 +249,7 @@ static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->data[1] = c->last_frame_bits;
ret = avio_read(s->pb, pkt->data+2, size);
- if (ret<=0) {
+ if (ret != size) {
av_free_packet(pkt);
return AVERROR(EIO);
}
More information about the ffmpeg-cvslog
mailing list