[Digikam-devel] [Bug 134999] crash in exiv2 when searching for new images

Mikael Lammentausta mikael.lammentausta at student.savonia-amk.fi
Fri Dec 15 19:32:00 GMT 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=134999         




------- Additional Comments From mikael.lammentausta student savonia-amk fi  2006-12-15 20:31 -------
Fabulous! I just successfully scanned my entire collection. :)

I used the correction suggested by Daniel, that is:

Index: libs/dmetadata/dmetadata.cpp
===================================================================
--- libs/dmetadata/dmetadata.cpp        (revision 613266)
+++ libs/dmetadata/dmetadata.cpp        (working copy)
 @ -1209,7 +1209,14  @
     // convert string:
     // Use whatever has the larger score, local or ASCII
     if (localScore >= 0 && localScore >= latin1Score)
-        return localCodec->toUnicode(value.c_str(), value.length());
+    {
+        // workaround for bug #134999:
+        // The QLatin15Codec may crash if strlen < value.length()
+        int length = value.length();
+        if (strcmp(localCodec->name(), "ISO 8859-15") == 0)
+            length = strlen(value.c_str());
+        return localCodec->toUnicode(value.c_str(), length);
+    }
     else
         return QString::fromLatin1(value.c_str());
 }



More information about the Digikam-devel mailing list