Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1490362
  • Loading branch information
Cristy committed Aug 31, 2015
1 parent 17435e6 commit 4f68e96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coders/tga.c
Expand Up @@ -315,6 +315,8 @@ static Image *ReadTGAImage(const ImageInfo *image_info,
/*
Read TGA raster colormap.
*/
if (image->colors < tga_info.colormap_index)
image->colors=tga_info.colormap_index;
if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
for (i=0; i < (ssize_t) tga_info.colormap_index; i++)
Expand Down

0 comments on commit 4f68e96

Please sign in to comment.