8273135: java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java crashes in liblcms.dylib with NULLSeek+0x7

Reviewed-by: aivanov, azvegint
This commit is contained in:
Sergey Bylokhov 2021-09-15 05:18:35 +00:00
parent 6cf70f5f08
commit 1017a2c2d7
2 changed files with 3 additions and 2 deletions

View File

@ -1532,7 +1532,7 @@ cmsBool IsTypeSupported(cmsTagDescriptor* TagDescriptor, cmsTagTypeSignature Typ
void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
cmsIOHANDLER* io = Icc ->IOhandler;
cmsIOHANDLER* io;
cmsTagTypeHandler* TypeHandler;
cmsTagTypeHandler LocalTypeHandler;
cmsTagDescriptor* TagDescriptor;
@ -1573,6 +1573,7 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)
if (TagSize < 8) goto Error;
io = Icc ->IOhandler;
// Seek to its location
if (!io -> Seek(io, Offset))
goto Error;

View File

@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* @test
* @bug 8271718
* @bug 8271718 8273135
* @summary Verifies MT safety of color transformation while profile is changed
*/
public final class MTTransformReplacedProfile {