changeset 11552:5571df7bf412

8141229: [Parfait] Null pointer dereference in cmsstrcasecmp of cmserr.c Reviewed-by: prr, serb
author vadim
date Wed, 18 Nov 2015 12:18:51 +0300
parents fe6354276d45
children a7439fc2e413
files src/share/native/sun/java2d/cmm/lcms/cmscgats.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/cmscgats.c	Tue Nov 03 19:07:45 2015 +0000
+++ b/src/share/native/sun/java2d/cmm/lcms/cmscgats.c	Wed Nov 18 12:18:51 2015 +0300
@@ -2545,9 +2545,11 @@
     for (i=0; i < t->nSamples; i++) {
 
         fld = GetDataFormat(it8, i);
+        if (fld != NULL) {
         if (cmsstrcasecmp(fld, cSample) == 0)
             return i;
     }
+    }
 
     return -1;