Blame SOURCES/exiv2-crash-in-pentax-camera-files.patch

7d3dc8
diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
7d3dc8
index 6b8b230..2daed4f 100644
7d3dc8
--- a/src/pentaxmn.cpp
7d3dc8
+++ b/src/pentaxmn.cpp
7d3dc8
@@ -1254,6 +1254,7 @@ namespace Exiv2 {
7d3dc8
             unsigned long lensID = 0x3ff;
7d3dc8
             unsigned long index  = 0;
7d3dc8
 
7d3dc8
+            // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
7d3dc8
             const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end()
7d3dc8
                                                     ? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"))
7d3dc8
                                                     : metadata->findKey(ExifKey("Exif.Pentax.LensInfo"))
7d3dc8
@@ -1268,8 +1269,6 @@ namespace Exiv2 {
7d3dc8
                 // 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
7d3dc8
                 unsigned long base   = 1;
7d3dc8
 
7d3dc8
-                // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
7d3dc8
-                const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.Pentax.LensInfo"));
7d3dc8
                 unsigned int  autoAperture     = lensInfo->toLong(base+1) & 0x01 ;
7d3dc8
                 unsigned int  minAperture      = lensInfo->toLong(base+2) & 0x06 ;
7d3dc8
                 unsigned int  minFocusDistance = lensInfo->toLong(base+3) & 0xf8 ;