diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-01-21 00:57:14 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-01-21 00:57:14 +0300 |
commit | b9eb325d581bf750e8af0cd38631243ba1f069b3 (patch) | |
tree | 2b44b8d25a0f2997087a2a17447e10110472d408 /src/thirdparty/lcms2 | |
parent | d1a54d05d860a94ce3c8f53e300aa09f29dac18e (diff) |
update lcms and ffmpeg
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2878 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/thirdparty/lcms2')
-rw-r--r-- | src/thirdparty/lcms2/include/lcms2.h | 4 | ||||
-rw-r--r-- | src/thirdparty/lcms2/src/cmslut.c | 6 | ||||
-rw-r--r-- | src/thirdparty/lcms2/src/cmstypes.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/thirdparty/lcms2/include/lcms2.h b/src/thirdparty/lcms2/include/lcms2.h index edeeb7b8a..7fb2fd9a8 100644 --- a/src/thirdparty/lcms2/include/lcms2.h +++ b/src/thirdparty/lcms2/include/lcms2.h @@ -81,6 +81,10 @@ extern "C" { typedef unsigned char cmsUInt8Number; // That is guaranteed by the C99 spec
typedef signed char cmsInt8Number; // That is guaranteed by the C99 spec
+#if CHAR_BIT != 8
+# error "Unable to find 8 bit type, unsupported compiler"
+#endif
+
// IEEE float storage numbers
typedef float cmsFloat32Number;
typedef double cmsFloat64Number;
diff --git a/src/thirdparty/lcms2/src/cmslut.c b/src/thirdparty/lcms2/src/cmslut.c index 886ca3027..2ec0a887f 100644 --- a/src/thirdparty/lcms2/src/cmslut.c +++ b/src/thirdparty/lcms2/src/cmslut.c @@ -256,7 +256,7 @@ cmsStage* CMSEXPORT cmsStageAllocToneCurves(cmsContext ContextID, cmsUInt32Numbe EvaluateCurves, CurveSetDup, CurveSetElemTypeFree, NULL );
if (NewMPE == NULL) return NULL;
- NewElem = (_cmsStageToneCurvesData*) _cmsMalloc(ContextID, sizeof(_cmsStageToneCurvesData));
+ NewElem = (_cmsStageToneCurvesData*) _cmsMallocZero(ContextID, sizeof(_cmsStageToneCurvesData));
if (NewElem == NULL) {
cmsStageFree(NewMPE);
return NULL;
@@ -548,7 +548,7 @@ cmsStage* CMSEXPORT cmsStageAllocCLut16bitGranular(cmsContext ContextID, if (NewMPE == NULL) return NULL;
- NewElem = (_cmsStageCLutData*) _cmsMalloc(ContextID, sizeof(_cmsStageCLutData));
+ NewElem = (_cmsStageCLutData*) _cmsMallocZero(ContextID, sizeof(_cmsStageCLutData));
if (NewElem == NULL) {
cmsStageFree(NewMPE);
return NULL;
@@ -635,7 +635,7 @@ cmsStage* CMSEXPORT cmsStageAllocCLutFloatGranular(cmsContext ContextID, const c if (NewMPE == NULL) return NULL;
- NewElem = (_cmsStageCLutData*) _cmsMalloc(ContextID, sizeof(_cmsStageCLutData));
+ NewElem = (_cmsStageCLutData*) _cmsMallocZero(ContextID, sizeof(_cmsStageCLutData));
if (NewElem == NULL) {
cmsStageFree(NewMPE);
return NULL;
diff --git a/src/thirdparty/lcms2/src/cmstypes.c b/src/thirdparty/lcms2/src/cmstypes.c index 03747afce..8cf7d3dd8 100644 --- a/src/thirdparty/lcms2/src/cmstypes.c +++ b/src/thirdparty/lcms2/src/cmstypes.c @@ -1602,6 +1602,7 @@ cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut cmsToneCurve* Tables[cmsMAXCHANNELS];
if (nChannels > cmsMAXCHANNELS) return FALSE;
+ if (nChannels <= 0) return FALSE;
memset(Tables, 0, sizeof(Tables));
@@ -1622,6 +1623,7 @@ cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut }
_cmsFree(ContextID, Temp);
+ Temp = NULL;
mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables);
|