mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/avidec: Check avio_read() return before using the results for meta-data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8a048fe6f8
commit
8c013a9e55
|
@ -308,7 +308,8 @@ static int avi_read_tag(AVFormatContext *s, AVStream *st, uint32_t tag,
|
|||
value = av_malloc(size + 1);
|
||||
if (!value)
|
||||
return AVERROR(ENOMEM);
|
||||
avio_read(pb, value, size);
|
||||
if (avio_read(pb, value, size) != size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
value[size] = 0;
|
||||
|
||||
AV_WL32(key, tag);
|
||||
|
|
Loading…
Reference in New Issue