Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/576
  • Loading branch information
Cristy committed Jul 17, 2017
1 parent 2ba8f33 commit bd40cc5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions coders/pdf.c
Expand Up @@ -1989,7 +1989,11 @@ RestoreMSCWarning
length*=image->colorspace == CMYKColorspace ? 4UL : 3UL;
pixel_info=AcquireVirtualMemory(length,sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
{
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
ThrowWriterException(ResourceLimitError,
"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
Dump runoffset encoded pixels.
Expand Down Expand Up @@ -2086,8 +2090,11 @@ RestoreMSCWarning
length=(size_t) number_pixels;
pixel_info=AcquireVirtualMemory(length,sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
ThrowWriterException(ResourceLimitError,
"MemoryAllocationFailed");
{
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
ThrowWriterException(ResourceLimitError,
"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
/*
Dump Runlength encoded pixels.
Expand Down

0 comments on commit bd40cc5

Please sign in to comment.