We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7779f1f commit 4e87854Copy full SHA for 4e87854
coders/sun.c
@@ -319,8 +319,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception)
319
sun_info.maplength=ReadBlobMSBLong(image);
320
if (sun_info.maplength > GetBlobSize(image))
321
ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
322
- extent=(size_t) (sun_info.height*sun_info.width);
323
- if ((sun_info.height != 0) && (sun_info.width != (extent/sun_info.height)))
+ if (HeapOverflowSanityCheckGetSize(sun_info.width,sun_info.height,&extent) != MagickFalse)
324
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
325
if ((sun_info.type != RT_STANDARD) && (sun_info.type != RT_ENCODED) &&
326
(sun_info.type != RT_FORMAT_RGB))
0 commit comments