diff --git a/SOURCES/exiv2-crash-in-pentax-camera-files.patch b/SOURCES/exiv2-crash-in-pentax-camera-files.patch new file mode 100644 index 0000000..06cffe9 --- /dev/null +++ b/SOURCES/exiv2-crash-in-pentax-camera-files.patch @@ -0,0 +1,21 @@ +diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp +index 6b8b230..2daed4f 100644 +--- a/src/pentaxmn.cpp ++++ b/src/pentaxmn.cpp +@@ -1254,6 +1254,7 @@ namespace Exiv2 { + unsigned long lensID = 0x3ff; + unsigned long index = 0; + ++ // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData + const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end() + ? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) + : metadata->findKey(ExifKey("Exif.Pentax.LensInfo")) +@@ -1268,8 +1269,6 @@ namespace Exiv2 { + // 0x0207 Pentax LensInfo Undefined 36 3 255 0 0 40 148 71 152 80 6 241 65 237 153 88 36 1 76 107 251 255 255 255 0 0 80 6 241 0 0 0 0 0 0 0 0 + unsigned long base = 1; + +- // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData +- const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.Pentax.LensInfo")); + unsigned int autoAperture = lensInfo->toLong(base+1) & 0x01 ; + unsigned int minAperture = lensInfo->toLong(base+2) & 0x06 ; + unsigned int minFocusDistance = lensInfo->toLong(base+3) & 0xf8 ; diff --git a/SPECS/compat-exiv2-026.spec b/SPECS/compat-exiv2-026.spec index 0a85622..0981289 100644 --- a/SPECS/compat-exiv2-026.spec +++ b/SPECS/compat-exiv2-026.spec @@ -1,7 +1,7 @@ Name: compat-exiv2-026 Version: 0.26 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Compatibility package with the exiv2 library in version 0.26 License: GPLv2+ @@ -10,6 +10,7 @@ Source0: http://www.exiv2.org/builds/exiv2-%{version}-trunk.tar.gz ## upstream patches Patch6: 0006-1296-Fix-submitted.patch +Patch7: exiv2-crash-in-pentax-camera-files.patch Patch10: exiv2-CVE-2017-17723.patch Patch11: exiv2-CVE-2017-17725.patch @@ -82,6 +83,10 @@ chmod 755 %{buildroot}%{_libdir}/libexiv2.so.* %changelog +* Tue Feb 18 2020 Jan Grulich - 0.26-2 +- Fix crash in Pentax camera files + Resolves: bz#1747857 + * Tue Jan 29 2019 Jan Grulich - 0.26-1 - Spec file based on exiv2 package to provide old libraries before API change Resolves: bz#1668355