[FFmpeg-cvslog] avformat/id3v2: Check avio_read() return value in read_chapter()

Michael Niedermayer git at videolan.org
Sun Dec 15 22:13:59 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 15 20:57:19 2013 +0100| [ffbcb1c6f051a1d000961f3a41d566158f8e9349] | committer: Michael Niedermayer

avformat/id3v2: Check avio_read() return value in read_chapter()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffbcb1c6f051a1d000961f3a41d566158f8e9349
---

 libavformat/id3v2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);



More information about the ffmpeg-cvslog mailing list