]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6278
authorCristy <urban-warrior@imagemagick.org>
Tue, 13 Feb 2018 12:21:45 +0000 (07:21 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 13 Feb 2018 12:21:45 +0000 (07:21 -0500)
coders/sun.c

index fe6277de99226f4464d2d9a904cbdca9fbcd0ccf..f6a749f8d96cc7fa9f7b5d8b94de6b9f3301896e 100644 (file)
@@ -478,7 +478,8 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
         sun_data=(unsigned char *) RelinquishMagickMemory(sun_data);
         ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
       }
-    ResetMagickMemory(sun_pixels,0,pixels_length*sizeof(*sun_pixels));
+    (void) ResetMagickMemory(sun_pixels,0,(pixels_length+image->rows)*
+      sizeof(*sun_pixels));
     if (sun_info.type == RT_ENCODED)
       {
         status=DecodeImage(sun_data,sun_info.length,sun_pixels,pixels_length);