[Digikam-devel] [Bug 134999] crash in exiv2 when searching for new images
Daniel Seifert
dseifert at gmx.de
Thu Dec 14 08:44:02 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 dseifert gmx de 2006-12-14 09:43 -------
I don't think your codec name check works.
Changing code to
int length = value.length();
DDebug() << "length: " << length << ", real len " << strlen(value.c_str()) << " and using codec " << localCodec->name() << endl;
if (localCodec->name() == "ISO 8859-15") {
length = strlen(value.c_str());
DDebug() << "8859-15, updating length to " << length << endl;
}
will output
digikam: file /home/dseifert/Bilder/2003/2003-12 Weihnachten/103_0301.JPG
digikam: done
digikam: length: 256, real len 0 and using codec ISO 8859-15
==15719==
==15719== Invalid write of size 2
==15719== at 0x563D03B: QLatin15Codec::toUnicode(char const*, int) const (in /usr/qt/3/lib/libqt-mt.so.3.3.6)
==15719== by 0x4325979: Digikam::DMetadata::detectEncodingAndDecode(std::string const&) (dmetadata.cpp:1207)
i.e. even though localCodec->name() returns "ISO 8859-15" it doesn't go into the if-clause.
I changed it to
if (strcmp(localCodec->name(), "ISO 8859-15") == 0)
and I was able to parse my whole collection of images without a crash or a corrupted database.
More information about the Digikam-devel
mailing list