[FFmpeg-devel] [PATCH] id3v2_read_ttag not 0-terminating string

Reimar Döffinger Reimar.Doeffinger
Fri Jul 4 18:23:07 CEST 2008


Hello,
realized while debugging http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1119
that id3v2_read_ttag might 0-terminate the string, proving once more
that id3 parsers are always buggy :-P.
One solution for fixing it (though there are thousands others):

Index: libavformat/mp3.c
===================================================================
--- libavformat/mp3.c   (revision 14060)
+++ libavformat/mp3.c   (working copy)
@@ -185,6 +185,7 @@
     char *q;
     int len;
 
+    if(dstlen > 0) dst[0] = 0;
     if(taglen < 1)
         return;
 





More information about the ffmpeg-devel mailing list