[PATCH] weird filename corruption

Alex Merry huntedhacker at tiscali.co.uk
Tue Apr 22 15:26:14 CEST 2008


I've been having a bizarre problem where I'd get errors like this:

TagLib: Could not open file /home/music/A/Hi-Fi_Serious/11_W.D.y.C.A.I..¡p3

Note that the 'm' of 'mp3' has been replaced, with an i in this case.  The 
character it is replaced with is not consistent, and sometimes it disappears 
altogether or the string cuts off at that point.  Occasionally, it just turns 
into

TagLib: Could not open file o

or some other character.  This is not consistent - about 70% of the time, 
there's no problem.

I traced it down to the name(fileName) assignment in the constructor 
File::FilePrivate::FilePrivate in toolkit/tfile.cpp, which seems to sometimes 
corrupt both fileName and name.  I have no idea why this would cause this 
problem, given that it's basically the constructor of std::string (I'm on 
Linux).

I noticed that the fact that name is a std::string is never used, so I ditched 
it.  The attached patch fixes the issue.

Can I commit this?

Alex


-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20080422/daf10d3a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taglib_filename_corruption_fix.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20080422/daf10d3a/attachment.bin 


More information about the taglib-devel mailing list