[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:34 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=cb164f7

The following commit has been merged in the master branch:
commit cb164f712fdf9fe228703529bead88d01a209166
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Aug 21 15:39:43 2004 +0000

    Added check if file exists before calls to ImageFactory::open
---
 src/exif.cpp | 7 +++++--
 src/iptc.cpp | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/exif.cpp b/src/exif.cpp
index 394d5cf..af9763f 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -20,14 +20,14 @@
  */
 /*
   File:      exif.cpp
-  Version:   $Name:  $ $Revision: 1.52 $
+  Version:   $Name:  $ $Revision: 1.53 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   26-Jan-04, ahu: created
              11-Feb-04, ahu: isolated as a component
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.52 $ $RCSfile: exif.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.53 $ $RCSfile: exif.cpp,v $");
 
 // Define DEBUG_MAKERNOTE to output debug information to std::cerr
 #undef DEBUG_MAKERNOTE
@@ -534,6 +534,7 @@ namespace Exiv2 {
 
     int ExifData::read(const std::string& path)
     {
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage) {
             int rc = pImage->readMetadata();
@@ -655,6 +656,7 @@ namespace Exiv2 {
 
     int ExifData::erase(const std::string& path) const
     {
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage == 0) return -2;
 
@@ -673,6 +675,7 @@ namespace Exiv2 {
         // Remove the Exif section from the file if there is no metadata 
         if (count() == 0 && !pThumbnail_) return erase(path);
 
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage == 0) return -2;
 
diff --git a/src/iptc.cpp b/src/iptc.cpp
index 3efb420..83c5532 100644
--- a/src/iptc.cpp
+++ b/src/iptc.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      iptc.cpp
-  Version:   $Name:  $ $Revision: 1.1 $
+  Version:   $Name:  $ $Revision: 1.2 $
   Author(s): Brad Schick (brad) <schick at robotbattle.com>
   History:   31-July-04, brad: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.1 $ $RCSfile: iptc.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.2 $ $RCSfile: iptc.cpp,v $");
 
 // Define DEBUG_MAKERNOTE to output debug information to std::cerr
 #undef DEBUG_MAKERNOTE
@@ -124,6 +124,7 @@ namespace Exiv2 {
 
     int IptcData::read(const std::string& path)
     {
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage) {
             int rc = pImage->readMetadata();
@@ -213,6 +214,7 @@ namespace Exiv2 {
 
     int IptcData::erase(const std::string& path) const
     {
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage == 0) return -2;
 
@@ -231,6 +233,7 @@ namespace Exiv2 {
         // Remove the Iptc section from the file if there is no metadata 
         if (count() == 0) return erase(path);
 
+        if (!fileExists(path, true)) return -1;
         Image* pImage = ImageFactory::instance().open(path);
         if (pImage == 0) return -2;
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list