Skip to content
Permalink
Browse files

http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26848

  • Loading branch information...
cristy
cristy committed Jan 8, 2015
1 parent 076d0c9 commit bd96074b254c6607a0f7731e59f923ad19d5a46d
Showing with 2 additions and 15 deletions.
  1. +2 −15 coders/sun.c
@@ -326,28 +326,17 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
size_t
one;

image->storage_class=PseudoClass;
image->colors=sun_info.maplength;
one=1;
if (sun_info.maptype == RMT_NONE)
image->colors=one << sun_info.depth;
if (sun_info.maptype == RMT_EQUAL_RGB)
image->colors=sun_info.maplength/3;
if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
switch (sun_info.maptype)
{
case RMT_NONE:
{
if (sun_info.depth < 24)
{
/*
Create linear color ramp.
*/
if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
break;
}
case RMT_EQUAL_RGB:
{
unsigned char
@@ -356,8 +345,6 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Read SUN raster colormap.
*/
if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
sun_colormap=(unsigned char *) AcquireQuantumMemory(image->colors,
sizeof(*sun_colormap));
if (sun_colormap == (unsigned char *) NULL)

0 comments on commit bd96074

Please sign in to comment.
You can’t perform that action at this time.