]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30623
authorCristy <urban-warrior@imagemagick.org>
Sat, 8 Oct 2016 14:20:50 +0000 (10:20 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 8 Oct 2016 14:21:20 +0000 (10:21 -0400)
coders/sun.c

index ac0ab5642fc540a71a214e505a09ad35d0a22299..0de94468c238e4bb0159a420c11068000c8481f9 100644 (file)
@@ -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");