[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:38:01 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=7a253e0
The following commit has been merged in the master branch:
commit 7a253e016e89b9e7523ede07b6e1aeb3f19ac16d
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Mon Nov 6 15:48:14 2006 +0000
Implemented quick fix for digikam bug 136932 (http://bugs.kde.org/show_bug.cgi?id=136932)
---
src/ifd.cpp | 15 +++++++++++++--
src/tiffvisitor.cpp | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/ifd.cpp b/src/ifd.cpp
index 2bd439d..753c389 100644
--- a/src/ifd.cpp
+++ b/src/ifd.cpp
@@ -325,11 +325,22 @@ namespace Exiv2 {
#endif
rc = 6;
}
+ int n = 0;
if (rc == 0) {
offset_ = start - shift;
- int n = getUShort(buf + o, byteOrder);
+ n = getUShort(buf + o, byteOrder);
o += 2;
-
+ // Sanity check with an "unreasonably" large number
+ if (n > 256) {
+#ifndef SUPPRESS_WARNINGS
+ std::cerr << "Error: "
+ << "Directory " << ExifTags::ifdName(ifdId_) << " with "
+ << n << " entries considered invalid; not read.
";
+#endif
+ rc = 6;
+ }
+ }
+ if (rc == 0) {
for (int i = 0; i < n; ++i) {
if (len < o + 12) {
#ifndef SUPPRESS_WARNINGS
diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index c07e3e3..50be3af 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -558,7 +558,7 @@ namespace Exiv2 {
const uint16_t n = getUShort(p, byteOrder());
p += 2;
// Sanity check with an "unreasonably" large number
- if (n > 512) {
+ if (n > 256) {
#ifndef SUPPRESS_WARNINGS
std::cerr << "Error: "
<< "Directory " << object->groupName() << " with "
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list