1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-01 15:29:20 +01:00
parent e6364ea26d
commit 06bb1de1c7

View File

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