From afb98cbc6e288dc8ea75f3394a347fb9b37abc55 Mon Sep 17 00:00:00 2001
From: Robin Mills <robin@clanmills.com>
Date: Mon, 22 Jan 2018 23:27:08 +0100
Subject: [PATCH] Allocate correct amount of memory for the ICC profile

---
 src/tiffimage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 8731449cd..a69c7afd5 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -191,7 +191,7 @@ namespace Exiv2 {
         Exiv2::ExifKey            key("Exif.Image.InterColorProfile");
         Exiv2::ExifData::iterator pos   = exifData_.findKey(key);
         if ( pos != exifData_.end()  ) {
-            iccProfile_.alloc(pos->count());
+            iccProfile_.alloc(pos->count()*pos->typeSize());
             pos->copy(iccProfile_.pData_,bo);
         }
 
