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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:40:22 UTC 2017


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

The following commit has been merged in the master branch:
commit 6c6fa8087733675463af91d4fe381dd13343bf0b
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Thu Feb 26 16:03:22 2009 +0000

    Replaced assertions with checks.
---
 src/tiffcomposite.cpp | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp
index cd2c0a2..42a64aa 100644
--- a/src/tiffcomposite.cpp
+++ b/src/tiffcomposite.cpp
@@ -272,9 +272,16 @@ namespace Exiv2 {
                                   uint32_t     sizeData,
                                   uint32_t     baseOffset)
     {
-        assert(pSize);
-        assert(pValue());
-
+        if (!pValue() || !pSize) {
+#ifndef SUPPRESS_WARNINGS
+            std::cerr << "Warning: "
+                      << "Directory " << tiffGroupName(group())
+                      << ", entry 0x" << std::setw(4)
+                      << std::setfill('0') << std::hex << tag()
+                      << ": Size or data offset value not set, ignoring them.
";
+#endif
+            return;
+        }
         if (pValue()->count() == 0) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: "
@@ -337,9 +344,16 @@ namespace Exiv2 {
                                    uint32_t     sizeData,
                                    uint32_t     baseOffset)
     {
-        assert(pSize);
-        assert(pValue());
-
+        if (!pValue() || !pSize) {
+#ifndef SUPPRESS_WARNINGS
+            std::cerr << "Warning: "
+                      << "Directory " << tiffGroupName(group())
+                      << ", entry 0x" << std::setw(4)
+                      << std::setfill('0') << std::hex << tag()
+                      << ": Size or data offset value not set, ignoring them.
";
+#endif
+            return;
+        }
         if (pValue()->count() != pSize->count()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: "
@@ -1375,6 +1389,7 @@ namespace Exiv2 {
 
     uint32_t TiffImageEntry::doSizeImage() const
     {
+        if (!pValue()) return 0;
         uint32_t len = pValue()->sizeDataArea();
         if (len == 0) {
             for (Strips::const_iterator i = strips_.begin(); i != strips_.end(); ++i) {

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list