https://github.com/ImageMagick/ImageMagick/issues/91
diff --git a/coders/sun.c b/coders/sun.c
index dc4204c..5411f2b 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -416,7 +416,7 @@
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     bytes_per_line=sun_info.width*sun_info.depth;
     sun_data=(unsigned char *) AcquireQuantumMemory((size_t) MagickMax(
-      sun_info.length,bytes_per_line*sun_info.width),sizeof(*sun_data));
+      sun_info.length,bytes_per_line*sun_info.width)+7,sizeof(*sun_data));
     if (sun_data == (unsigned char *) NULL)
       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
     count=(ssize_t) ReadBlob(image,sun_info.length,sun_data);