Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > e9e9fdddc78e006405bf7b2a0a0939c6 > files > 1

exempi-2.2.2-16.1.mga6.src.rpm

Index: exempi-2.2.2/source/XMPFiles/FileHandlers/TIFF_Handler.cpp
===================================================================
--- exempi-2.2.2/source/XMPFiles/FileHandlers/TIFF_Handler.cpp
+++ exempi-2.2.2/source/XMPFiles/FileHandlers/TIFF_Handler.cpp	2018-03-19 09:31:35.024010261 +0100
@@ -228,7 +228,9 @@
 
 			iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
 			
-			if ( (iptcDigestState == kDigestDiffers) && (kTIFF_TypeSizes[iptcInfo.type] > 1) ) {
+			// See bug https://bugs.freedesktop.org/show_bug.cgi?id=105205
+			// if iptcInfo.dataLen is 0, then there is no digest.
+			if ( (iptcDigestState == kDigestDiffers) && (kTIFF_TypeSizes[iptcInfo.type] > 1) && iptcInfo.dataLen > 0 ) {
 				XMP_Uns8 * endPtr = (XMP_Uns8*)iptcInfo.dataPtr + iptcInfo.dataLen - 1;
 				XMP_Uns8 * minPtr = endPtr - kTIFF_TypeSizes[iptcInfo.type] + 1;
 				while ( (endPtr >= minPtr) && (*endPtr == 0) ) --endPtr;