# HG changeset patch # User jchen # Date 1372872133 25200 # Node ID e06dee31a8646318cc3f81b2370dbd7145d752d3 # Parent 482096e5f6144770dc7433ab134cb41f39b56003 8014497: [parfait] Potential null pointer dereference in jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c Reviewed-by: bae, prr diff -r 482096e5f614 -r e06dee31a864 jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c --- a/jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c Wed Jul 03 19:00:10 2013 +0400 +++ b/jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c Wed Jul 03 10:22:13 2013 -0700 @@ -548,6 +548,10 @@ for (i=0; i < nOuts; i++) { cmsToneCurve* InversePostLin = cmsReverseToneCurve(Curves[i]); + if (InversePostLin == NULL) { + WhiteOut[i] = 0; + continue; + } WhiteOut[i] = cmsEvalToneCurve16(InversePostLin, WhitePointOut[i]); cmsFreeToneCurve(InversePostLin); }