Commit dabba008 authored by Cristy's avatar Cristy

...

parent c9537454
...@@ -387,10 +387,8 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception) ...@@ -387,10 +387,8 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
XWDColor XWDColor
color; color;
length=(size_t) header.ncolors; colors=(XColor *) AcquireQuantumMemory((size_t) header.ncolors,
if (length > ((~0UL)/sizeof(*colors))) sizeof(*colors));
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
colors=(XColor *) AcquireQuantumMemory(length,sizeof(*colors));
if (colors == (XColor *) NULL) if (colors == (XColor *) NULL)
{ {
ximage=(XImage *) RelinquishMagickMemory(ximage); ximage=(XImage *) RelinquishMagickMemory(ximage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment