Sophie

Sophie

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

imagemagick-6.8.9.9-4.2.mga5.src.rpm

From 1fe9bcf765411cd8c173443a698659bfe5ed5c8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Tue, 23 Dec 2014 15:41:32 +0100
Subject: Avoid an out of bound access in palm file

git-svn-id: https://subversion.imagemagick.org/subversion/ImageMagick/branches/ImageMagick-6@17291 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
Origin:  http://trac.imagemagick.org/changeset/17291

diff --git a/coders/palm.c b/coders/palm.c
index 864c706..968e38d 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -517,8 +517,9 @@ static Image *ReadPALMImage(const ImageInfo *image_info,
       }
     if (flags & PALM_HAS_TRANSPARENCY_FLAG)
       {
+        IndexPacket index=ConstrainColormapIndex(image,(mask-transparentIndex));
         if (bits_per_pixel != 16)
-          SetMagickPixelPacket(image,image->colormap+(mask-transparentIndex),
+          SetMagickPixelPacket(image,image->colormap+index,
             (const IndexPacket *) NULL,&transpix);
         (void) TransparentPaintImage(image,&transpix,(Quantum)
           TransparentOpacity,MagickFalse);
-- 
cgit v0.10.2