diff options
author | Marti <marti.maria@tktbrainpower.com> | 2017-01-25 13:28:27 +0100 |
---|---|---|
committer | Marti <marti.maria@tktbrainpower.com> | 2017-01-25 13:28:27 +0100 |
commit | 06662a755525586223efe1790da1497d5b2d9e67 (patch) | |
tree | 12ab3c04500f53f45317385d6c188b40adc89e30 /src/cmslut.c | |
parent | 4336eb41e83dca79d6575b55ef7aa88bb3ed59f4 (diff) | |
download | lcms2-06662a755525586223efe1790da1497d5b2d9e67.tar.gz |
sanitize input & output channels on MPE profiles
Diffstat (limited to 'src/cmslut.c')
-rw-r--r-- | src/cmslut.c | 9 |
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; |