summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/exiv2/files/exiv2-0.26-pentaxnikon-crash.patch')
-rw-r--r--media-gfx/exiv2/files/exiv2-0.26-pentaxnikon-crash.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/media-gfx/exiv2/files/exiv2-0.26-pentaxnikon-crash.patch b/media-gfx/exiv2/files/exiv2-0.26-pentaxnikon-crash.patch
new file mode 100644
index 000000000000..a66af8d5dc96
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.26-pentaxnikon-crash.patch
@@ -0,0 +1,52 @@
+From 2dc166b04ca6152d01bff6627a332e89ddef24d1 Mon Sep 17 00:00:00 2001
+From: clanmills <robin@clanmills.com>
+Date: Tue, 12 Sep 2017 09:14:42 +0100
+Subject: [PATCH 1/2] Fix http://dev.exiv2.org/issues/1305
+
+---
+ src/pentaxmn.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
+index 4fc38be0..b22cb43b 100644
+--- a/src/pentaxmn.cpp
++++ b/src/pentaxmn.cpp
+@@ -1167,6 +1167,8 @@ namespace Exiv2 {
+
+ std::ostream& PentaxMakerNote::printShutterCount(std::ostream& os, const Value& value, const ExifData* metadata)
+ {
++ if ( ! metadata ) return os << "undefined" ;
++
+ ExifData::const_iterator dateIt = metadata->findKey(
+ ExifKey("Exif.PentaxDng.Date"));
+ if (dateIt == metadata->end()) {
+--
+2.13.6
+
+
+From 3bc0b91bcecefdad531129b1a934be1251021c95 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C4=81ris=20Narti=C5=A1s?= <mn@sungis.lv>
+Date: Mon, 18 Sep 2017 23:37:40 +0300
+Subject: [PATCH 2/2] Fix crash on undefined metadata on some Nikon images.
+ Identical to commit:5405d61623e82896e498c5c8342dd6f42e689115
+
+---
+ src/nikonmn.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
+index 571ab806..34bf601c 100644
+--- a/src/nikonmn.cpp
++++ b/src/nikonmn.cpp
+@@ -299,6 +299,8 @@ namespace Exiv2 {
+ const Value& value,
+ const ExifData* exifData)
+ {
++ if ( ! exifData ) return os << "undefined" ;
++
+ if ( value.count() >= 9 ) {
+ ByteOrder bo = getKeyString("Exif.MakerNote.ByteOrder",exifData) == "MM" ? bigEndian : littleEndian;
+ byte p[4];
+--
+2.13.6
+