diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-05 19:31:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-05 19:38:20 +0100 |
commit | 8c013a9e55d9065793ef7ca6459d1178927a2b35 (patch) | |
tree | 649505c0c1237f6cc4a01793c6324b25f6c18b4a | |
parent | 8a048fe6f8bf41de93c091a7a9b3132bedc1b41c (diff) | |
download | ffmpeg-8c013a9e55d9065793ef7ca6459d1178927a2b35.tar.gz |
avformat/avidec: Check avio_read() return before using the results for meta-data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 8a0938d5dc..5c9443a4f4 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -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); |