[FFmpeg-cvslog] id2v2: check the return value of decode_str()

Michael Niedermayer git at videolan.org
Sun Jun 9 17:36:00 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  9 17:25:39 2013 +0200| [6241e8a3821d971755217652dff01f3a45580820] | committer: Michael Niedermayer

id2v2: check the return value of decode_str()

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

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

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

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 74d6375..4bc76a3 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -527,7 +527,8 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, char *tta
     int taglen;
     char tag[5];
 
-    decode_str(s, pb, 0, &dst, &len);
+    if (decode_str(s, pb, 0, &dst, &len) < 0)
+        return;
     if (len < 16)
         return;
 



More information about the ffmpeg-cvslog mailing list