From ced5eb7f8d7d219f51f01775c070037199b4ea2e Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 25 Jan 2015 21:25:47 +0000 Subject: [PATCH] --- coders/sun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coders/sun.c b/coders/sun.c index db5d7bb53..f77d5b9b0 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -47,6 +47,7 @@ #include "MagickCore/color.h" #include "MagickCore/color-private.h" #include "MagickCore/colormap.h" +#include "MagickCore/colormap-private.h" #include "MagickCore/colorspace.h" #include "MagickCore/colorspace-private.h" #include "MagickCore/exception.h" @@ -495,7 +496,8 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) break; for (x=0; x < (ssize_t) image->columns; x++) { - SetPixelIndex(image,*p++,q); + SetPixelIndex(image,ConstrainColormapIndex(image,*p,exception),q); + p++; q+=GetPixelChannels(image); } if ((image->columns % 2) != 0) -- 2.40.0