提交 ed9f2aa8 编写于 作者: B bae

6963489: ZDI-CAN-803: Sun JRE ICC Profile Device Information Tag Remote Code...

6963489: ZDI-CAN-803: Sun JRE ICC Profile Device Information Tag Remote Code Execution Vulnerability
Reviewed-by: prr
上级 989c9a53
...@@ -190,12 +190,13 @@ JNIEXPORT jlong JNICALL Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform ...@@ -190,12 +190,13 @@ JNIEXPORT jlong JNICALL Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform
"sTrans.xf == NULL"); "sTrans.xf == NULL");
JNU_ThrowByName(env, "java/awt/color/CMMException", JNU_ThrowByName(env, "java/awt/color/CMMException",
"Cannot get color transform"); "Cannot get color transform");
} else {
Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, sTrans.j);
} }
if (iccArray != &_iccArray[0]) { if (iccArray != &_iccArray[0]) {
free(iccArray); free(iccArray);
} }
Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, sTrans.j);
return sTrans.j; return sTrans.j;
} }
......
...@@ -687,6 +687,9 @@ LPMATSHAPER cmsBuildGrayOutputMatrixShaper(cmsHPROFILE hProfile) ...@@ -687,6 +687,9 @@ LPMATSHAPER cmsBuildGrayOutputMatrixShaper(cmsHPROFILE hProfile)
LPGAMMATABLE Shapes1[3]; LPGAMMATABLE Shapes1[3];
GrayTRC = cmsReadICCGamma(hProfile, icSigGrayTRCTag); GrayTRC = cmsReadICCGamma(hProfile, icSigGrayTRCTag);
if (!GrayTRC) {
return NULL;
}
FromLstarToXYZ(GrayTRC, Shapes1); FromLstarToXYZ(GrayTRC, Shapes1);
// Reversing must be done after curve translation // Reversing must be done after curve translation
...@@ -703,6 +706,9 @@ LPMATSHAPER cmsBuildGrayOutputMatrixShaper(cmsHPROFILE hProfile) ...@@ -703,6 +706,9 @@ LPMATSHAPER cmsBuildGrayOutputMatrixShaper(cmsHPROFILE hProfile)
// Normal case // Normal case
GrayTRC = cmsReadICCGammaReversed(hProfile, icSigGrayTRCTag); // Y GrayTRC = cmsReadICCGammaReversed(hProfile, icSigGrayTRCTag); // Y
if (!GrayTRC) {
return NULL;
}
Shapes[0] = cmsDupGamma(GrayTRC); Shapes[0] = cmsDupGamma(GrayTRC);
Shapes[1] = cmsDupGamma(GrayTRC); Shapes[1] = cmsDupGamma(GrayTRC);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册