summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-15 20:57:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-15 22:11:28 +0100
commitffbcb1c6f051a1d000961f3a41d566158f8e9349 (patch)
treea114216bec2f6beffbaed4ca3f505c6d76360f8b
parent460f8fca9c26f217c9f379677e50c1ea03ccc9d7 (diff)
downloadffmpeg-streaming-ffbcb1c6f051a1d000961f3a41d566158f8e9349.zip
ffmpeg-streaming-ffbcb1c6f051a1d000961f3a41d566158f8e9349.tar.gz
avformat/id3v2: Check avio_read() return value in read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/id3v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index effaaf4..6c82632 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);
OpenPOWER on IntegriCloud