diff --git a/coders/dpx.c b/coders/dpx.c index 4352435b4d..d1d329b1cf 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -1141,7 +1141,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) CloseBlob(image); return(GetFirstImageInList(image)); } - if (HeapOverflowSanityCheck(image->columns,4*image->depth) != MagickFalse) + if (HeapOverflowSanityCheck(image->columns,4*image->depth/8) != MagickFalse) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); status=SetImageExtent(image,image->columns,image->rows,exception); if (status == MagickFalse)