Skip to content

Commit

Permalink
8273135: java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.jav…
Browse files Browse the repository at this point in the history
…a crashes in liblcms.dylib with NULLSeek+0x7

Backport-of: 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c
  • Loading branch information
mrserb committed Sep 29, 2021
1 parent 2586eb0 commit cdd4075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/java.desktop/share/native/liblcms/cmsio0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
* @test
* @bug 8271718
* @bug 8271718 8273135
* @summary Verifies MT safety of color transformation while profile is changed
*/
public final class MTTransformReplacedProfile {
Expand Down

1 comment on commit cdd4075

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.