From: Cristy Date: Tue, 13 Feb 2018 12:21:45 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6278 X-Git-Tag: 7.0.7-23~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5960b92b652b51cc53852e7ba3c9b65abceb0452;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6278 --- diff --git a/coders/sun.c b/coders/sun.c index fe6277de9..f6a749f8d 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -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);