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

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