Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mm2/Little-CMS.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/tificc/tificc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/tificc/tificc.c b/utils/tificc/tificc.c
index cc97bbb..9ebf45e 100644
--- a/utils/tificc/tificc.c
+++ b/utils/tificc/tificc.c
@@ -657,13 +657,16 @@ static
void DoEmbedProfile(TIFF* Out, const char* ProfileFile)
{
FILE* f;
- cmsUInt32Number size, EmbedLen;
+ cmsInt32Number size;
+ cmsUInt32Number EmbedLen;
cmsUInt8Number* EmbedBuffer;
f = fopen(ProfileFile, "rb");
if (f == NULL) return;
size = cmsfilelength(f);
+ if (size < 0) return;
+
EmbedBuffer = (cmsUInt8Number*) malloc(size + 1);
if (EmbedBuffer == NULL) {
OutOfMem(size+1);