]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 30 Mar 2011 14:36:48 +0000 (14:36 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 30 Mar 2011 14:36:48 +0000 (14:36 +0000)
coders/pcl.c

index 21c093809f7f93517a73785180237f049ba54925..40baa6f2f102e1209b5feb6683dc6f9c70e0202c 100644 (file)
@@ -822,14 +822,14 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
       }
       default:
       {
-        compress_pixels=(unsigned char *) AcquireQuantumMemory(length+256,
+        compress_pixels=(unsigned char *) AcquireQuantumMemory(3*length+256,
           sizeof(*compress_pixels));
         if (compress_pixels == (unsigned char *) NULL)
           {
             pixels=(unsigned char *) RelinquishMagickMemory(pixels);
             ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
           }
-        (void) ResetMagickMemory(compress_pixels,0,(length+256)*
+        (void) ResetMagickMemory(compress_pixels,0,(3*length+256)*
           sizeof(*compress_pixels));
         previous_pixels=(unsigned char *) AcquireQuantumMemory(length+1,
           sizeof(*previous_pixels));