[Digikam-devel] [Bug 141980] digikam crash when rescan certain files exiv2
Gilles Caulier
caulier.gilles at gmail.com
Tue Feb 20 17:23:03 GMT 2007
------- 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=141980
------- Additional Comments From caulier.gilles gmail com 2007-02-20 18:23 -------
SVN commit 635684 by cgilles:
libkexiv2 from trunk : sanity check if QByteArray are null size everywhere
Feedback welcome...
CCBUGS:141980
M +8 -4 kexiv2.cpp
--- trunk/extragear/libs/libkexiv2/kexiv2.cpp #635683:635684
@ -186,7 +186,8 @
Exiv2::ExifData& exif = d->exifMetadata;
Exiv2::DataBuf c2 = exif.copy();
QByteArray data(c2.size_);
- memcpy(data.data(), c2.pData_, c2.size_);
+ if (data.size())
+ memcpy(data.data(), c2.pData_, c2.size_);
return data;
}
}
@ -226,7 +227,8 @
c2 = iptc.copy();
QByteArray data(c2.size_);
- memcpy(data.data(), c2.pData_, c2.size_);
+ if (data.size())
+ memcpy(data.data(), c2.pData_, c2.size_);
return data;
}
}
@ -1222,7 +1224,8 @
if (it != exifData.end())
{
QByteArray data((*it).size());
- (*it).copy((Exiv2::byte*)data.data(), exifData.byteOrder());
+ if (data.size())
+ (*it).copy((Exiv2::byte*)data.data(), exifData.byteOrder());
return data;
}
}
@ -1245,7 +1248,8 @
if (it != iptcData.end())
{
QByteArray data((*it).size());
- (*it).copy((Exiv2::byte*)data.data(), Exiv2::bigEndian);
+ if (data.size())
+ (*it).copy((Exiv2::byte*)data.data(), Exiv2::bigEndian);
return data;
}
}
More information about the Digikam-devel
mailing list