Blame SOURCES/exiv2-CVE-2018-5772.patch

340e69
diff --git a/src/cr2image.cpp b/src/cr2image.cpp
340e69
index 2907426..b6fa315 100644
340e69
--- a/src/cr2image.cpp
340e69
+++ b/src/cr2image.cpp
340e69
@@ -107,8 +107,6 @@ namespace Exiv2 {
340e69
             throw Error(3, "CR2");
340e69
         }
340e69
         clearMetadata();
340e69
-        std::ofstream devnull;
340e69
-        printStructure(devnull, kpsRecursive, 0);
340e69
         ByteOrder bo = Cr2Parser::decode(exifData_,
340e69
                                          iptcData_,
340e69
                                          xmpData_,
340e69
diff --git a/src/crwimage.cpp b/src/crwimage.cpp
340e69
index ca79aa7..11cd14c 100644
340e69
--- a/src/crwimage.cpp
340e69
+++ b/src/crwimage.cpp
340e69
@@ -131,15 +131,8 @@ namespace Exiv2 {
340e69
             throw Error(33);
340e69
         }
340e69
         clearMetadata();
340e69
-        // read all metadata into memory
340e69
-        // we should put this into clearMetadata(), however it breaks the test suite!
340e69
-        try {
340e69
-            std::ofstream devnull;
340e69
-            printStructure(devnull,kpsRecursive,0);
340e69
-        } catch (Exiv2::Error& /* e */) {
340e69
-            DataBuf file(io().size());
340e69
-            io_->read(file.pData_,file.size_);
340e69
-        }
340e69
+        DataBuf file( (long) io().size());
340e69
+        io_->read(file.pData_,file.size_);
340e69
 
340e69
         CrwParser::decode(this, io_->mmap(), io_->size());
340e69
 
340e69
diff --git a/src/orfimage.cpp b/src/orfimage.cpp
340e69
index c516591..9a17a50 100644
340e69
--- a/src/orfimage.cpp
340e69
+++ b/src/orfimage.cpp
340e69
@@ -119,8 +119,6 @@ namespace Exiv2 {
340e69
             throw Error(3, "ORF");
340e69
         }
340e69
         clearMetadata();
340e69
-        std::ofstream devnull;
340e69
-        printStructure(devnull, kpsRecursive, 0);
340e69
         ByteOrder bo = OrfParser::decode(exifData_,
340e69
                                          iptcData_,
340e69
                                          xmpData_,
340e69
diff --git a/src/rw2image.cpp b/src/rw2image.cpp
340e69
index 95f3b28..764de6f 100644
340e69
--- a/src/rw2image.cpp
340e69
+++ b/src/rw2image.cpp
340e69
@@ -130,8 +130,6 @@ namespace Exiv2 {
340e69
             throw Error(3, "RW2");
340e69
         }
340e69
         clearMetadata();
340e69
-        std::ofstream devnull;
340e69
-        printStructure(devnull, kpsRecursive, 0);
340e69
         ByteOrder bo = Rw2Parser::decode(exifData_,
340e69
                                          iptcData_,
340e69
                                          xmpData_,
340e69
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
340e69
index f20c69e..9e6eda4 100644
340e69
--- a/src/tiffimage.cpp
340e69
+++ b/src/tiffimage.cpp
340e69
@@ -185,10 +185,6 @@ namespace Exiv2 {
340e69
         }
340e69
         clearMetadata();
340e69
 
340e69
-        // recursively print the structure to /dev/null to ensure all metadata is in memory
340e69
-        // must be recursive to handle NEFs which stores the raw image in a subIFDs
340e69
-        std::ofstream devnull;
340e69
-        printStructure(devnull,kpsRecursive,0);
340e69
         ByteOrder bo = TiffParser::decode(exifData_,
340e69
                                           iptcData_,
340e69
                                           xmpData_,