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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:45:14 UTC 2017


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

The following commit has been merged in the master branch:
commit 2f375e8f02ebfa620b5326dbccb2bba16d3bb2e4
Author: Robin Mills <robin at clanmills.com>
Date:   Fri May 1 08:08:15 2015 +0000

    #922.  Adding to the test suite.
---
 src/image.cpp                                   |   6 +++---
 test/bugfixes-test.sh                           |  11 ++++++++---
 test/data/bugfixes-test.out                     | Bin 1827317 -> 1838738 bytes
 test/data/{imagemagick.png => exiv2-bug922.png} | Bin 144766 -> 131388 bytes
 test/data/exiv2-bug922.tif                      | Bin 0 -> 7780 bytes
 test/data/exiv2-bug922a.jpg                     | Bin 0 -> 7169623 bytes
 6 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/image.cpp b/src/image.cpp
index b2f1dee..2a6afdb 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -360,14 +360,14 @@ namespace Exiv2 {
     {
         std::string result;
 
-        int     need   = (int) std::strlen(format)*2;          // initial guess
+        int     need   = (int) std::strlen(format)*4;          // initial guess
         char*   buffer = NULL;
         int     again  =    4;
         int     rc     =   -1;
 
         while (rc < 0 && again--) {
             if ( buffer ) delete[] buffer;
-            need   *= 2 ;
+            need  *= 2 ;
             buffer = new char[need];
             if ( buffer ) {
                 va_list  args;                                 // variable arg list
@@ -377,7 +377,7 @@ namespace Exiv2 {
             }
         }
 
-        if ( rc > 0 ) result = std::string(buffer) ;
+        if ( buffer && rc > 0 ) result = std::string(buffer);  // save the result
         if ( buffer ) delete[] buffer;                         // free buffer
         return result;
     }
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index edfd9b7..f79407d 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -268,11 +268,16 @@ source ./functions.source
 	filename=exiv2-bug$num.jpg
 	printf "$num " >&3
 	echo '------>' Bug $num '<-------' >&2
-	copyTestFile  $filename
-	runTest exiv2 -pX $filename
+	copyTestFile      $filename
+	runTest exiv2 -pX $filename ; echo '' # add a lf after the XMP/xml
 	filename=iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg
-	copyTestFile  $filename
+	copyTestFile      $filename
 	runTest exiv2 -pX $filename
+	for filename in exiv2-bug$num.png exiv2-bug$num.tif exiv2-bug${num}a.jpg; do
+		copyTestFile $filename ;
+		runTest exiv2 -pX $filename ; echo ''
+		runTest exiv2 -pS $filename
+	done
 
 	num=937
 	filename=exiv2-bug$num.jpg
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 6c2cd34..2908875 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/imagemagick.png b/test/data/exiv2-bug922.png
similarity index 83%
copy from test/data/imagemagick.png
copy to test/data/exiv2-bug922.png
index 88ae8c1..c068d8a 100644
Binary files a/test/data/imagemagick.png and b/test/data/exiv2-bug922.png differ
diff --git a/test/data/exiv2-bug922.tif b/test/data/exiv2-bug922.tif
new file mode 100755
index 0000000..b006201
Binary files /dev/null and b/test/data/exiv2-bug922.tif differ
diff --git a/test/data/exiv2-bug922a.jpg b/test/data/exiv2-bug922a.jpg
new file mode 100644
index 0000000..5a40a2e
Binary files /dev/null and b/test/data/exiv2-bug922a.jpg differ

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list