Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion IccProfLib/IccEncoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Copyright: see ICC Software License
#include "IccUtil.h"
#include <string>
#include <time.h>
#include <cstring>

class CIccDefaultEncProfileCacheHandler : public IIccEncProfileCacheHandler
{
Expand Down Expand Up @@ -289,6 +290,7 @@ icStatusEncConvert CIccDefaultEncProfileConverter::ConvertFromParams(CIccProfile
pIcc->AttachTag(icSigAToB3Tag, pMpeTag);

if (!icMatrixInvert3x3(pMtx2->GetMatrix())) {
delete pMtx2;
delete pIcc;
return icEncConvertBadParams;
}
Expand Down Expand Up @@ -586,4 +588,4 @@ icStatusEncConvert icConvertEncodingProfile(CIccProfilePtr &newIcc, CIccProfile
delete pParams;

return stat;
}
}
5 changes: 5 additions & 0 deletions IccProfLib/IccMatrixMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

#include "IccMatrixMath.h"
#include "IccUtil.h"
#include <cstring>

#ifdef USEREFICCMAXNAMESPACE
namespace refIccMAX {
Expand Down Expand Up @@ -417,3 +418,7 @@ CIccMatrixMath *CIccMatrixMath::rangeMap(const icSpectralRange &srcRange, const

return NULL;
}

#ifdef USEREFICCMAXNAMESPACE
} //namespace refIccMAX
#endif
1 change: 0 additions & 1 deletion IccProfLib/IccPcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ icFloatNumber *IIccProfileConnectionConditions::getEmissiveObserver(const icSpec
if (mapRange) {

if (obs) {
icFloatNumber *Ycmf = new icFloatNumber[range.steps];
fptr = &pView->m_observer[0];
tptr = obs;
for (i=0; i<3; i++) {
Expand Down
1 change: 1 addition & 0 deletions IccProfLib/IccSparseMatrix.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "IccSparseMatrix.h"

#include <cstring>

CIccSparseMatrix::CIccSparseMatrix(void *pMatrix, icUInt32Number nSize, icSparseMatrixType nType, bool bInitFromData/*=false*/)
{
Expand Down
2 changes: 1 addition & 1 deletion IccProfLib/IccTagBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4305,7 +4305,7 @@ void CIccTagSparseMatrixArray::Describe(std::string &sDescription)
for (r=0; r<mtx.Rows(); r++) {
icUInt16Number rs = start[r];
icUInt16Number re = start[r+1];
sprintf(buf, "Row%d:");
sprintf(buf, "Row%d:", r);
sDescription += buf;

for (c=rs; c<re; c++) {
Expand Down
4 changes: 3 additions & 1 deletion IccProfLib/IccTagComposite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,10 @@ bool CIccTagArray::Read(icUInt32Number size, CIccIO *pIO)
if (count) {
icPositionNumber *tagPos = new icPositionNumber[count];

if (!SetSize(count))
if (!SetSize(count)) {
delete[] tagPos;
return false;
}

for (i=0; i<count; i++) {
if (!pIO->Read32(&tagPos[i].offset) ||
Expand Down
5 changes: 3 additions & 2 deletions Tools/CmdLine/IccApplyProfiles/iccApplyProfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,15 @@ int main(int argc, icChar* argv[])
}
}

unsigned char *pSBuf = (unsigned char *)malloc(SrcImg.GetBytesPerLine());
unsigned char *pDBuf = (unsigned char *)malloc(DstImg.GetBytesPerLine());
unsigned char *pSBuf = (unsigned char *)malloc(SrcImg.GetBytesPerLine());

if (!pSBuf) {
printf("Out of Memory!\n");
return false;
}

unsigned char *pDBuf = (unsigned char *)malloc(DstImg.GetBytesPerLine());

if (!pDBuf) {
printf("Out of Memory!\n");
free(pSBuf);
Expand Down