D20877: Fix exivextractor crash with malformed files

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sun Apr 28 14:23:54 BST 2019


bruns added inline comments.

INLINE COMMENTS

> exiv2extractor.cpp:299
>      Exiv2::ExifData::const_iterator it = data.findKey(Exiv2::ExifKey("Exif.GPSInfo.GPSAltitude"));
> -    if (it != data.end() && (it->value().typeId() == Exiv2::unsignedRational || it->value().typeId() == Exiv2::signedRational)) {
> +    if (it != data.end() && it->count() > 0 &&
> +        (it->value().typeId() == Exiv2::unsignedRational || it->value().typeId() == Exiv2::signedRational)) {

`!it->empty()` ?

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D20877

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190428/0edfd8cf/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list