TagLib 1.5 segfaults on one file
Scott Wheeler
wheeler at kde.org
Sat Jan 10 23:23:51 CET 2009
On Jan 10, 2009, at 10:38 PM, Vidar Wahlberg wrote:
>
> Looked a bit more into this today, for some reason I was sure the
> error
> was in tstring.cpp so I didn't look in apeitem.cpp last night.
> However,
> that's where the error is.
> In APE::Item::render() there's a "StringList::ConstIterator it =
> d->text.begin();", but it doesn't check if "it == d->text.end()"
> before
> using that iterator. I've attached a patch for this :)
Here's the diff I checked in -- this should do the trick, no?
--- apeitem.cpp (revision 892976)
+++ apeitem.cpp (working copy)
@@ -164,7 +164,7 @@
case Binary:
if(d->text.isEmpty())
return true;
- if(d->text.size() == 1 && d->text.front().isEmpty())
+ if(d->text.isEmpty() || (d->text.size() == 1 && d-
>text.front().isEmpty()))
return true;
return false;
case Locator:
> Also, a fairly dumb question: How can I compile the examples when
> checking out from svn? I'm not familiar with cmake, compiling taglib
> itself was simple, although "cmake . && make" in the examples
> directory
> did not work as well as I wanted it to.
You can also just build TagLib with autotools. I do. Then just doing
"make" in there does the trick. If you're unfamiliar with KDE's old
autotools setup, you generate the configure file with "make -f
Makefile.cvs".
-Scott
More information about the taglib-devel
mailing list