From 5d04522afcfec1feaddbec9ba0f796231aee2ebb Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Tue, 8 Dec 2020 17:09:09 +0000
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1752

---
 coders/png.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/coders/png.c b/coders/png.c
index ee6fba2..4107410 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -11177,11 +11177,11 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),
         "    Allocating %.20g bytes of memory for pixels",(double) rowbytes);
     }
-  pixel_info=AcquireVirtualMemory(rowbytes+256,sizeof(*ping_pixels));
+  pixel_info=AcquireVirtualMemory(rowbytes,sizeof(*ping_pixels));
   if (pixel_info == (MemoryInfo *) NULL)
     png_error(ping,"Allocation of memory for pixels failed");
   ping_pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
-  (void) memset(ping_pixels,0,(rowbytes+256)*sizeof(*ping_pixels));
+  (void) memset(ping_pixels,0,rowbytes*sizeof(*ping_pixels));
   /*
     Initialize image scanlines.
   */
-- 
2.23.0

