diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-29 00:57:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-29 00:58:13 +0100 |
commit | 8e90c7285d1cbf62a9c9a5f9e6efda998dc0d454 (patch) | |
tree | 78df755096f8dbe269c5f6fd0b83025408263aa0 | |
parent | 55fa898969d10e2d47bba0613175bf57a86c5a41 (diff) | |
download | ffmpeg-8e90c7285d1cbf62a9c9a5f9e6efda998dc0d454.tar.gz |
avformat/iff: check avio_read() return in get_metadata()
Fixes: msan_uninit-mem_7f9539ba8461_4760_dasboot_in_compressed
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index b5751c5664..3838db116c 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -118,7 +118,7 @@ static int get_metadata(AVFormatContext *s, if (!buf) return AVERROR(ENOMEM); - if (avio_read(s->pb, buf, data_size) < 0) { + if (avio_read(s->pb, buf, data_size) != data_size) { av_free(buf); return AVERROR(EIO); } |