[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:43:34 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=e6e6d7b
The following commit has been merged in the master branch:
commit e6e6d7b45c674faebb0929866ec977bbda6c1599
Author: Robin Mills <robin at clanmills.com>
Date: Sun Jan 13 01:31:18 2013 +0000
Issue: #876 Fix for Exiv.Canon.LensModel displaying garbage bytes.
---
src/tiffvisitor.cpp | 7 ++++++-
src/types.hpp | 2 +-
src/value.cpp | 14 +++++++-------
test/bugfixes-test.sh | 3 +--
test/data/bugfixes-test.out | Bin 106683 -> 106963 bytes
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index 3212088..964f047 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -1528,7 +1528,12 @@ namespace Exiv2 {
}
Value::AutoPtr v = Value::create(typeId);
assert(v.get());
- v->read(pData, size, byteOrder());
+ // http://dev.exiv2.org/issues/876
+ // Exif.Canon.LensModel allocates additional bytes in the file following the null terminator
+ int group = object->group();
+ int tag = object->tag();
+ bool bCanonAscii = canonId == group && tag == 149 && typeId == ttAsciiString ;
+ v->read(pData, size, bCanonAscii ? asciiBytes : byteOrder());
object->setValue(v);
object->setData(pData, size);
diff --git a/src/types.hpp b/src/types.hpp
index 0743492..9a5abad 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -101,7 +101,7 @@ namespace Exiv2 {
typedef std::pair<int32_t, int32_t> Rational;
//! Type to express the byte order (little or big endian)
- enum ByteOrder { invalidByteOrder, littleEndian, bigEndian };
+ enum ByteOrder { invalidByteOrder, littleEndian, bigEndian,asciiBytes };
//! Type to indicate write method used by TIFF parsers
enum WriteMethod { wmIntrusive, wmNonIntrusive };
diff --git a/src/value.cpp b/src/value.cpp
index 497c8dd..d75a528 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -296,15 +296,15 @@ namespace Exiv2 {
return 0;
}
- int StringValueBase::read(const byte* buf, long len, ByteOrder /*byteOrder*/)
+ int StringValueBase::read(const byte* buf, long len, ByteOrder byteOrder)
{
- // byteOrder not needed
if (buf) value_ = std::string(reinterpret_cast<const char*>(buf), len);
- // http://dev.exiv2.org/issues/876
- // garbage in Exif.Canon.LensModel due to len == 74 and strlen(buf) = 17
- size_t nullByte = value_.find('
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list