--- old/src/java.desktop/share/native/liblcms/cmsio0.c 2020-08-27 15:57:41.442103129 -0700 +++ new/src/java.desktop/share/native/liblcms/cmsio0.c 2020-08-27 15:57:41.154103133 -0700 @@ -30,7 +30,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2017 Marti Maria Saguer +// Copyright (c) 1998-2020 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), @@ -263,7 +263,7 @@ // Create a iohandler for memory block. AccessMode=='r' assumes the iohandler is going to read, and makes // a copy of the memory block for letting user to free the memory after invoking open profile. In write -// mode ("w"), Buffere points to the begin of memory block to be written. +// mode ("w"), Buffer points to the begin of memory block to be written. cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buffer, cmsUInt32Number size, const char* AccessMode) { cmsIOHANDLER* iohandler = NULL; @@ -662,7 +662,6 @@ else { // No, make a new one - if (Icc -> TagCount >= MAX_TABLE_TAG) { cmsSignalError(Icc ->ContextID, cmsERROR_RANGE, "Too many tags (%d)", MAX_TABLE_TAG); return FALSE; @@ -683,8 +682,6 @@ return _cmsSearchTag(Icc, sig, FALSE) >= 0; } - - // Enforces that the profile version is per. spec. // Operates on the big endian bytes from the profile. // Called before converting to platform endianness. @@ -1596,7 +1593,7 @@ if (!IsTypeSupported(TagDescriptor, BaseType)) goto Error; - TagSize -= 8; // Alredy read by the type base logic + TagSize -= 8; // Already read by the type base logic // Get type handler TypeHandler = _cmsGetTagTypeHandler(Icc ->ContextID, BaseType); @@ -1631,6 +1628,7 @@ _cmsTagSignature2String(String, sig); cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "'%s' Inconsistent number of items: expected %d, got %d", String, TagDescriptor ->ElemCount, ElemCount); + goto Error; } @@ -1827,7 +1825,7 @@ return Icc ->TagSizes[i]; } - // The data has been already read, or written. But wait!, maybe the user choosed to save as + // The data has been already read, or written. But wait!, maybe the user chose to save as // raw data. In this case, return the raw data directly if (Icc ->TagSaveAsRaw[i]) { @@ -1847,7 +1845,7 @@ return Icc ->TagSizes[i]; } - // Already readed, or previously set by cmsWriteTag(). We need to serialize that + // Already read, or previously set by cmsWriteTag(). We need to serialize that // data to raw in order to maintain consistency. _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);