From d6614e744532ae4641a5a68e798ad9bf77b573bc Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 8 Oct 2016 10:20:50 -0400 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30623 --- coders/sun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 2.40.0