diff options
author | Cristy <mikayla-grace@urban-warrior.org> | 2021-01-03 08:25:02 -0500 |
---|---|---|
committer | Cristy <mikayla-grace@urban-warrior.org> | 2021-01-03 08:25:02 -0500 |
commit | ac4f25ef71b53c5098da06465c81a8b3d9a59abe (patch) | |
tree | 42b0454e98196bdf682018d3f6611b0c9494b772 | |
parent | 96dedcd9c7ff0e0edc449fb0ceb0577776977cf5 (diff) | |
download | ImageMagick-ac4f25ef71b53c5098da06465c81a8b3d9a59abe.tar.gz |
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29189
-rw-r--r-- | coders/mac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coders/mac.c b/coders/mac.c index 2eea05cb2..3071c98cf 100644 --- a/coders/mac.c +++ b/coders/mac.c @@ -163,9 +163,10 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception) Convert MAC raster image to pixel packets. */ length=(image->columns+7)/8; - pixels=(unsigned char *) AcquireQuantumMemory(length+1,sizeof(*pixels)); + pixels=(unsigned char *) AcquireQuantumMemory(length+257,sizeof(*pixels)); if (pixels == (unsigned char *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); + (void) memset(pixels,0,(length+257)*sizeof(*pixels)); p=pixels; offset=0; for (y=0; y < (ssize_t) image->rows; ) |