[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:16 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=ee1ca29
The following commit has been merged in the master branch:
commit ee1ca29d096ba3a4540cc1b6f75ceea4898aeeeb
Author: Robin Mills <robin at clanmills.com>
Date: Sat May 2 13:03:31 2015 +0000
#1073 test/tiff-test.sh rewritten to no longer require external utility exifprobe
---
src/image.cpp | 11 +--
src/tiffimage.cpp | 18 ++---
test/data/bugfixes-test.out | Bin 1838577 -> 1838574 bytes
test/data/tiff-test.out | 172 +++++++++++++++++++++-----------------------
test/tiff-test.sh | 101 ++++++++++++++++++++++++--
5 files changed, 193 insertions(+), 109 deletions(-)
diff --git a/src/image.cpp b/src/image.cpp
index a50ba1f..f134aca 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -367,7 +367,7 @@ namespace Exiv2 {
while (rc < 0 && again--) {
if ( buffer ) delete[] buffer;
- need *= 2 ;
+ need *= 2 ;
buffer = new char[need];
if ( buffer ) {
va_list args; // variable arg list
@@ -390,9 +390,12 @@ namespace Exiv2 {
size += start;
while (start < size) {
- int c = (int) buff[start++] ;
- if (c < ' ' || c > 127) c = '.' ;
- result += (char) c ;
+ int c = (int) buff[start++] ;
+ bool bTrailingNull = c == 0 && start == size;
+ if ( !bTrailingNull ) {
+ if (c < ' ' || c > 127) c = '.' ;
+ result += (char) c ;
+ }
}
return result;
}
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 1f6e650..4e5c1fc 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -303,15 +303,15 @@ namespace Exiv2 {
}
bool isBigEndian()
- {
- union {
- uint32_t i;
- char c[4];
- } e = { 0x01000000 };
+ {
+ union {
+ uint32_t i;
+ char c[4];
+ } e = { 0x01000000 };
- return e.c[0]?true:false;
- }
- bool isLittleEndian() { return !isBigEndian(); }
+ return e.c[0]?true:false;
+ }
+ bool isLittleEndian() { return !isBigEndian(); }
// http://en.wikipedia.org/wiki/Endianness
@@ -504,7 +504,7 @@ namespace Exiv2 {
: 1
;
- DataBuf buf(MIN(size*kount + pad,48)); // allocate a buffer
+ DataBuf buf(MIN(size*kount + pad,48)); // allocate a buffer
if ( isStringType(type) || count*size > 4 ) { // data is in the directory => read into buffer
size_t restore = io_->tell(); // save
io_->seek(offset,BasicIo::beg); // position
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index bc89940..3b0a94f 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/tiff-test.out b/test/data/tiff-test.out
index 6a4d765..ca4c1c9 100644
--- a/test/data/tiff-test.out
+++ b/test/data/tiff-test.out
@@ -1,46 +1,43 @@
-[30mFile Name = mini9.tif
-File Type = TIFF:II
-File Size = 526
- at 000000000=0 : TIFF(II=0x4949) magic=0x002a='*
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list