lcms (1.18.dfsg-1.2) direct (non packaging) changes

Summary

 src/cmsxform.c |    6 ++++++
 1 file changed, 6 insertions(+)

    
download this patch

Patch contents

--- lcms-1.18.dfsg.orig/src/cmsxform.c
+++ lcms-1.18.dfsg/src/cmsxform.c
@@ -660,6 +660,9 @@
                 GrayTRC = cmsReadICCGamma(hProfile, icSigGrayTRCTag);
                 FromLstarToXYZ(GrayTRC, Shapes1);
 
+		if (GrayTRC == NULL)
+			return NULL;
+
                 // Reversing must be done after curve translation
 
                 Shapes[0] = cmsReverseGamma(Shapes1[0]->nEntries, Shapes1[0]);
@@ -675,6 +678,9 @@
 
                 GrayTRC = cmsReadICCGammaReversed(hProfile, icSigGrayTRCTag);   // Y
 
+		if (GrayTRC == NULL)
+			return NULL;
+
                 Shapes[0] = cmsDupGamma(GrayTRC);
                 Shapes[1] = cmsDupGamma(GrayTRC);
                 Shapes[2] = cmsDupGamma(GrayTRC);