Bug 141678

Summary: Trailing spaces in ID3v1 tags
Product: [Frameworks and Libraries] taglib Reporter: Xavier Duret <xaviour.maillists>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: ID3v1 trailing spaces fix

Description Xavier Duret 2007-02-14 13:56:19 UTC
Version:           svn 633141 (using KDE Devel)
Installed from:    Compiled sources

It seams that there is at least one quite popular encoder that generate ID3v1
frames with trailing spaces instead of using NULL terminated strings.
Comment 1 Xavier Duret 2007-02-14 13:57:37 UTC
Created attachment 19684 [details]
ID3v1 trailing spaces fix

This is a trivial patch and do not break binary compatibility.
Comment 2 Scott Wheeler 2007-04-01 22:32:17 UTC
SVN commit 648986 by wheeler:

Strip whitespaces from the end of ID3v1 fields on the way into TagLib.

BUG:141678


 M  +1 -1      id3v1tag.cpp  


--- trunk/kdesupport/taglib/taglib/mpeg/id3v1/id3v1tag.cpp #648985:648986
@@ -55,7 +55,7 @@
 
 String ID3v1::StringHandler::parse(const ByteVector &data) const
 {
-  return String(data, String::Latin1);
+  return String(data, String::Latin1).stripWhiteSpace();
 }
 
 ByteVector ID3v1::StringHandler::render(const String &s) const