[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:26 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=58c5ffd
The following commit has been merged in the master branch:
commit 58c5ffdedca2f8bf720c083682987fac3abdda1d
Author: Robin Mills <robin at clanmills.com>
Date: Fri Apr 22 14:11:09 2016 +0000
#1108. Fixed issue with printing short strings which are stored in the directory offset field.
---
src/tiffimage.cpp | 7 ++++---
test/data/bugfixes-test.out | Bin 1900959 -> 1901156 bytes
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 2bf59d9..34c5c04 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -414,6 +414,7 @@ namespace Exiv2 {
return type == Exiv2::asciiString
|| type == Exiv2::unsignedByte
|| type == Exiv2::signedByte
+ || type == Exiv2::undefined
;
}
static bool isShortType(uint16_t type) {
@@ -524,13 +525,13 @@ namespace Exiv2 {
// if ( offset > io.size() ) offset = 0; // Denial of service?
DataBuf buf(MIN(size*kount + pad,48)); // allocate a buffer
- if ( isStringType(type) || count*size > 4 ) { // data is in the directory => read into buffer
+ if ( (isStringType(type) && count*size > 4) || count*size > 4 ) { // read into buffer
size_t restore = io.tell(); // save
io.seek(offset,BasicIo::beg); // position
io.read(buf.pData_,kount*size);// read
io.seek(restore,BasicIo::beg); // restore
- } else { // move data from directory to the buffer
- std::memcpy(buf.pData_,dir.pData_+8,12);
+ } else { // move data from directory into buffer
+ std::memcpy(buf.pData_,dir.pData_+8,4);
}
uint32_t Offset = isLongType(type) ? byteSwap4(buf,0,bSwap) : 0 ;
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index a5050c8..8f31222 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list