Skip to content
Permalink
Browse files

#1450

  • Loading branch information...
Cristy
Cristy committed Jan 20, 2019
1 parent 8a43abe commit 1e6a3ace073c9ec9c71e439c111d23c6e66cb6ae
Showing with 4 additions and 0 deletions.
  1. +4 −0 coders/pcd.c
@@ -204,6 +204,8 @@ static MagickBooleanType DecodeImage(Image *image,unsigned char *luma,
if (pcd_table[i] == (PCDTable *) NULL)
{
buffer=(unsigned char *) RelinquishMagickMemory(buffer);
for (j=0; j < i; j++)
pcd_table[j]=(PCDTable *) RelinquishMagickMemory(pcd_table[j]);
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
}
@@ -215,6 +217,8 @@ static MagickBooleanType DecodeImage(Image *image,unsigned char *luma,
if (r->length > 16)
{
buffer=(unsigned char *) RelinquishMagickMemory(buffer);
for (j=0; j <= i; j++)
pcd_table[j]=(PCDTable *) RelinquishMagickMemory(pcd_table[j]);
return(MagickFalse);
}
PCDGetBits(16);

0 comments on commit 1e6a3ac

Please sign in to comment.
You can’t perform that action at this time.