mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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>
This commit is contained in:
parent
55fa898969
commit
8e90c7285d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user