summaryrefslogtreecommitdiff
path: root/src/cmslut.c
diff options
context:
space:
mode:
authorMarti <marti.maria@tktbrainpower.com>2017-01-25 13:28:27 +0100
committerMarti <marti.maria@tktbrainpower.com>2017-01-25 13:28:27 +0100
commit06662a755525586223efe1790da1497d5b2d9e67 (patch)
tree12ab3c04500f53f45317385d6c188b40adc89e30 /src/cmslut.c
parent4336eb41e83dca79d6575b55ef7aa88bb3ed59f4 (diff)
downloadlcms2-06662a755525586223efe1790da1497d5b2d9e67.tar.gz
sanitize input & output channels on MPE profiles
Diffstat (limited to 'src/cmslut.c')
-rw-r--r--src/cmslut.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cmslut.c b/src/cmslut.c
index 4be839b..16169f9 100644
--- a/src/cmslut.c
+++ b/src/cmslut.c
@@ -1361,21 +1361,18 @@ void _LUTevalFloat(register const cmsFloat32Number In[], register cmsFloat32Numb
}
-
-
// LUT Creation & Destruction
-
cmsPipeline* CMSEXPORT cmsPipelineAlloc(cmsContext ContextID, cmsUInt32Number InputChannels, cmsUInt32Number OutputChannels)
{
cmsPipeline* NewLUT;
- if (InputChannels >= cmsMAXCHANNELS ||
- OutputChannels >= cmsMAXCHANNELS) return NULL;
+ // A value of zero in channels is allowed as placeholder
+ if (InputChannels >= cmsMAXCHANNELS ||
+ OutputChannels >= cmsMAXCHANNELS) return NULL;
NewLUT = (cmsPipeline*) _cmsMallocZero(ContextID, sizeof(cmsPipeline));
if (NewLUT == NULL) return NULL;
-
NewLUT -> InputChannels = InputChannels;
NewLUT -> OutputChannels = OutputChannels;