blob: a66af8d5dc9660bf3b1dd1c38efb32834f1d5bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
|