Permalink
Browse files

#143

  • Loading branch information...
Cristy
Cristy committed Mar 7, 2016
1 parent 4a259b3 commit 424d40ebfcde48bb872eba75179d3d73704fdf1f
Showing with 2 additions and 2 deletions.
  1. +2 −2 coders/pdb.c
@@ -420,7 +420,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
return(DestroyImageList(image));
}
packets=(bits_per_pixel*image->columns+7)/8;
pixels=(unsigned char *) AcquireQuantumMemory(packets+256UL,image->rows*
pixels=(unsigned char *) AcquireQuantumMemory(packets+257UL,image->rows*
sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
@@ -822,7 +822,7 @@ static MagickBooleanType WritePDBImage(const ImageInfo *image_info,Image *image)
image->rows*sizeof(*runlength));
if (runlength == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
buffer=(unsigned char *) AcquireQuantumMemory(256,sizeof(*buffer));
buffer=(unsigned char *) AcquireQuantumMemory(257,sizeof(*buffer));
if (buffer == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
packet_size=(size_t) (image->depth > 8 ? 2: 1);

0 comments on commit 424d40e

Please sign in to comment.