diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-15 23:57:19 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-16 01:11:28 +0400 |
commit | ffbcb1c6f051a1d000961f3a41d566158f8e9349 (patch) | |
tree | a114216bec2f6beffbaed4ca3f505c6d76360f8b /libavformat/id3v2.c | |
parent | 460f8fca9c26f217c9f379677e50c1ea03ccc9d7 (diff) |
avformat/id3v2: Check avio_read() return value in read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r-- | libavformat/id3v2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index effaaf41b0..6c82632ba0 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -544,7 +544,8 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, char *tta len -= 16; while (len > 10) { - avio_read(pb, tag, 4); + if (avio_read(pb, tag, 4) < 4) + goto end; tag[4] = 0; taglen = avio_rb32(pb); avio_skip(pb, 2); |