Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 857b723175ea1d5f45c5b31f25037f76 > files > 22

imagemagick-6.8.9.9-4.2.mga5.src.rpm

From 52f6d868f1c37bb5cc3a9226efc0e95acc2ab2a3 Mon Sep 17 00:00:00 2001
From: cristy <cristy@aa41f4f7-0bf4-0310-aa73-e5a19afd5a74>
Date: Thu, 4 Dec 2014 00:19:57 +0000
Subject: Fix out of bound access in sun image handling

It the merge of rev 17153 and rev 17155

Origin: http://trac.imagemagick.org/changeset/17153 and  http://trac.imagemagick.org/changeset/17155

diff --git a/coders/sun.c b/coders/sun.c
index 9ab412b..1d974db 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -526,8 +526,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
             bytes_per_pixel++;
           if (bytes_per_line == 0)
             bytes_per_line=bytes_per_pixel*image->columns;
-          length=image->rows*((bytes_per_line*image->columns)+image->columns %
-            2);
+          length=image->rows*(bytes_per_line+image->columns % 2);
           if (((sun_info.type == RT_ENCODED) &&
                (length > (bytes_per_line*image->rows))) ||
               ((sun_info.type != RT_ENCODED) && (length > sun_info.length)))
-- 
cgit v0.10.2