Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed May 6, 2017
1 parent 82c0f06 commit 5964475
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coders/xwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
color;

length=(size_t) header.ncolors;
if (length > ((~0UL)/sizeof(*colors)))
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
colors=(XColor *) AcquireQuantumMemory(length,sizeof(*colors));
if (colors == (XColor *) NULL)
{
Expand Down

0 comments on commit 5964475

Please sign in to comment.