--- a/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c Fri May 17 14:18:44 2013 +0400
+++ b/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c Fri May 17 10:04:39 2013 -0700
@@ -634,6 +634,8 @@
cmsFloat64Number dnum = 0.0;
int sign = 1;
+ if (Buffer == NULL) return 0.0;
+
if (*Buffer == '-' || *Buffer == '+') {
sign = (*Buffer == '-') ? -1 : 1;
--- a/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c Fri May 17 14:18:44 2013 +0400
+++ b/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c Fri May 17 10:04:39 2013 -0700
@@ -1021,6 +1021,8 @@
mpe = cmsStageAllocToneCurves(ContextID, 3, LabTable);
cmsFreeToneCurveTriple(LabTable);
+ if (mpe == NULL) return NULL;
+
mpe ->Implements = cmsSigLabV2toV4;
return mpe;
}