diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmsalpha.c | 2 | ||||
-rw-r--r-- | src/cmscam02.c | 4 | ||||
-rw-r--r-- | src/cmscgats.c | 10 | ||||
-rw-r--r-- | src/cmscnvrt.c | 2 | ||||
-rw-r--r-- | src/cmserr.c | 2 | ||||
-rw-r--r-- | src/cmsgamma.c | 2 | ||||
-rw-r--r-- | src/cmshalf.c | 2 | ||||
-rw-r--r-- | src/cmsintrp.c | 2 | ||||
-rw-r--r-- | src/cmsio0.c | 8 | ||||
-rw-r--r-- | src/cmsio1.c | 2 | ||||
-rw-r--r-- | src/cmslut.c | 2 | ||||
-rw-r--r-- | src/cmsmd5.c | 2 | ||||
-rw-r--r-- | src/cmsmtrx.c | 2 | ||||
-rw-r--r-- | src/cmsnamed.c | 10 | ||||
-rw-r--r-- | src/cmsopt.c | 2 | ||||
-rw-r--r-- | src/cmspack.c | 2 | ||||
-rw-r--r-- | src/cmspcs.c | 2 | ||||
-rw-r--r-- | src/cmsplugin.c | 2 | ||||
-rw-r--r-- | src/cmsps2.c | 2 | ||||
-rw-r--r-- | src/cmssamp.c | 2 | ||||
-rw-r--r-- | src/cmssm.c | 2 | ||||
-rw-r--r-- | src/cmstypes.c | 2 | ||||
-rw-r--r-- | src/cmsvirt.c | 2 | ||||
-rw-r--r-- | src/cmswtpnt.c | 2 | ||||
-rw-r--r-- | src/cmsxform.c | 2 | ||||
-rw-r--r-- | src/lcms2_internal.h | 2 |
26 files changed, 42 insertions, 34 deletions
diff --git a/src/cmsalpha.c b/src/cmsalpha.c index d0cd189..806577f 100644 --- a/src/cmsalpha.c +++ b/src/cmsalpha.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmscam02.c b/src/cmscam02.c index f7838ee..3f080a1 100644 --- a/src/cmscam02.c +++ b/src/cmscam02.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), @@ -324,7 +324,7 @@ CAM02COLOR HPEtoCAT02(CAM02COLOR clr) M[5] = ((-0.7036 * 0.201908) + (1.6975 * 0.000008) + 0.0061); M[6] = (( 0.0030 * 1.910197) + (0.0136 * 0.370950)); M[7] = (( 0.0030 * -1.112124) + (0.0136 * 0.629054)); - M[8] = (( 0.0030 * 0.201908) + (0.0136 * 0.000008) + 0.9834);; + M[8] = (( 0.0030 * 0.201908) + (0.0136 * 0.000008) + 0.9834); clr.RGBc[0] = (clr.RGBp[0] * M[0]) + (clr.RGBp[1] * M[1]) + (clr.RGBp[2] * M[2]); clr.RGBc[1] = (clr.RGBp[0] * M[3]) + (clr.RGBp[1] * M[4]) + (clr.RGBp[2] * M[5]); diff --git a/src/cmscgats.c b/src/cmscgats.c index 845c18a..51fc2a6 100644 --- a/src/cmscgats.c +++ b/src/cmscgats.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), @@ -1939,13 +1939,15 @@ cmsBool CMSEXPORT cmsIT8SaveToMem(cmsHANDLE hIT8, void *MemPtr, cmsUInt32Number* memset(&sd, 0, sizeof(sd)); sd.stream = NULL; - sd.Base = (cmsUInt8Number*) MemPtr; + sd.Base = (cmsUInt8Number*) MemPtr; sd.Ptr = sd.Base; sd.Used = 0; - if (sd.Base) - sd.Max = *BytesNeeded; // Write to memory? + if (sd.Base && (*BytesNeeded > 0)) { + + sd.Max = (*BytesNeeded) - 1; // Write to memory? + } else sd.Max = 0; // Just counting the needed bytes diff --git a/src/cmscnvrt.c b/src/cmscnvrt.c index bca5796..de63975 100644 --- a/src/cmscnvrt.c +++ b/src/cmscnvrt.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmserr.c b/src/cmserr.c index 0078886..ccb40f9 100644 --- a/src/cmserr.c +++ b/src/cmserr.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsgamma.c b/src/cmsgamma.c index 5abbf16..1031fc1 100644 --- a/src/cmsgamma.c +++ b/src/cmsgamma.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmshalf.c b/src/cmshalf.c index 57cb5b0..043ee53 100644 --- a/src/cmshalf.c +++ b/src/cmshalf.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsintrp.c b/src/cmsintrp.c index 5eb98e6..2b5c634 100644 --- a/src/cmsintrp.c +++ b/src/cmsintrp.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsio0.c b/src/cmsio0.c index 222f7c7..945140a 100644 --- a/src/cmsio0.c +++ b/src/cmsio0.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), @@ -1922,7 +1922,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si if (data != NULL) { if (BufferSize < TagSize) - goto Error; + TagSize = BufferSize; if (!Icc ->IOhandler ->Seek(Icc ->IOhandler, Offset)) goto Error; if (!Icc ->IOhandler ->Read(Icc ->IOhandler, data, 1, TagSize)) goto Error; @@ -1935,7 +1935,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si return Icc ->TagSizes[i]; } - // The data has been already read, or written. But wait!, maybe the user chose to save as + // The data has been already read, or written. But wait!, maybe the user choose to save as // raw data. In this case, return the raw data directly if (Icc ->TagSaveAsRaw[i]) { @@ -1944,7 +1944,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si TagSize = Icc ->TagSizes[i]; if (BufferSize < TagSize) - goto Error; + TagSize = BufferSize; memmove(data, Icc ->TagPtrs[i], TagSize); diff --git a/src/cmsio1.c b/src/cmsio1.c index 5df75fa..b923739 100644 --- a/src/cmsio1.c +++ b/src/cmsio1.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmslut.c b/src/cmslut.c index 6f8012a..77977fc 100644 --- a/src/cmslut.c +++ b/src/cmslut.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsmd5.c b/src/cmsmd5.c index f0af214..cd6ce97 100644 --- a/src/cmsmd5.c +++ b/src/cmsmd5.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsmtrx.c b/src/cmsmtrx.c index 86a66f7..5f5a3c8 100644 --- a/src/cmsmtrx.c +++ b/src/cmsmtrx.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsnamed.c b/src/cmsnamed.c index bc580aa..54d1abf 100644 --- a/src/cmsnamed.c +++ b/src/cmsnamed.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), @@ -763,7 +763,13 @@ cmsStage* CMSEXPORT _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsNAMEDCOLORLIST* CMSEXPORT cmsGetNamedColorList(cmsHTRANSFORM xform) { _cmsTRANSFORM* v = (_cmsTRANSFORM*) xform; - cmsStage* mpe = v ->Lut->Elements; + cmsStage* mpe; + + if (v == NULL) return NULL; + if (v->Lut == NULL) return NULL; + + mpe = v->Lut->Elements; + if (mpe == NULL) return NULL; if (mpe ->Type != cmsSigNamedColorElemType) return NULL; return (cmsNAMEDCOLORLIST*) mpe ->Data; diff --git a/src/cmsopt.c b/src/cmsopt.c index 8d64d17..b3d831c 100644 --- a/src/cmsopt.c +++ b/src/cmsopt.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmspack.c b/src/cmspack.c index 72b4785..5a96712 100644 --- a/src/cmspack.c +++ b/src/cmspack.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmspcs.c b/src/cmspcs.c index a0f1952..e11f87c 100644 --- a/src/cmspcs.c +++ b/src/cmspcs.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsplugin.c b/src/cmsplugin.c index 1d8c358..3876506 100644 --- a/src/cmsplugin.c +++ b/src/cmsplugin.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsps2.c b/src/cmsps2.c index 4bb17b0..9aeea36 100644 --- a/src/cmsps2.c +++ b/src/cmsps2.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmssamp.c b/src/cmssamp.c index 124deff..4888f1e 100644 --- a/src/cmssamp.c +++ b/src/cmssamp.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmssm.c b/src/cmssm.c index fb6965e..5c1e430 100644 --- a/src/cmssm.c +++ b/src/cmssm.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmstypes.c b/src/cmstypes.c index 2a565b0..ec1909f 100644 --- a/src/cmstypes.c +++ b/src/cmstypes.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsvirt.c b/src/cmsvirt.c index b8ef607..951a8ee 100644 --- a/src/cmsvirt.c +++ b/src/cmsvirt.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmswtpnt.c b/src/cmswtpnt.c index 07d4746..a73eaa7 100644 --- a/src/cmswtpnt.c +++ b/src/cmswtpnt.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/cmsxform.c b/src/cmsxform.c index 38ea624..c70b7cb 100644 --- a/src/cmsxform.c +++ b/src/cmsxform.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), diff --git a/src/lcms2_internal.h b/src/lcms2_internal.h index 94282a4..1fc99fb 100644 --- a/src/lcms2_internal.h +++ b/src/lcms2_internal.h @@ -1,7 +1,7 @@ // // Little Color Management System -// Copyright (c) 1998-2022 Marti Maria Saguer +// Copyright (c) 1998-2023 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"), |