forked from FFmpeg/FFmpeg
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
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ static int get_metadata(AVFormatContext *s,
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return AVERROR(ENOMEM);
|
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);
|
av_free(buf);
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue