From: Cristy Date: Sat, 8 Oct 2016 14:20:50 +0000 (-0400) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30623 X-Git-Tag: 7.0.3-3~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6614e744532ae4641a5a68e798ad9bf77b573bc;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30623 --- diff --git a/coders/sun.c b/coders/sun.c index ac0ab5642..0de94468c 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -440,9 +440,9 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) sun_data=(unsigned char *) RelinquishMagickMemory(sun_data); ThrowReaderException(ResourceLimitError,"ImproperImageHeader"); } - bytes_per_line+=15; + bytes_per_line+=7; bytes_per_line<<=1; - if ((bytes_per_line >> 1) != (sun_info.width*sun_info.depth+15)) + if ((bytes_per_line >> 1) != (sun_info.width*sun_info.depth+7)) { sun_data=(unsigned char *) RelinquishMagickMemory(sun_data); ThrowReaderException(ResourceLimitError,"ImproperImageHeader");