void-packages/srcpkgs/exiv2/patches/f9d0be42.patch

24 lines
906 B
Diff
Raw Normal View History

2017-09-19 12:26:28 +02:00
From 591dea579ae946972fef14bbf799b2d3a12e82d4 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] 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 92047755..8c42e317 100644
--- src/nikonmn.cpp
+++ 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];