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

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