Commit 4e96b1133 for imagemagick.org
commit 4e96b113369d16f649644b66d3513af505aae35e
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Tue Jun 23 06:27:11 2026 +0200
Use AcquireQuantumMemory instead because it already does the necessary checks.
diff --git a/coders/miff.c b/coders/miff.c
index c58546f72..e9550fb15 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -159,15 +159,8 @@ static MagickBooleanType IsMIFF(const unsigned char *magick,const size_t length)
static void *AcquireCompressionMemory(void *context,const size_t items,
const size_t size)
{
- size_t
- extent;
-
(void) context;
- if (HeapOverflowSanityCheckGetSize(items,size,&extent) != MagickFalse)
- return((void *) NULL);
- if (extent > GetMaxMemoryRequest())
- return((void *) NULL);
- return(AcquireMagickMemory(extent));
+ return(AcquireQuantumMemory(items,size));
}
#endif