Commit 325fce5ad for imagemagick.org
commit 325fce5add2fd4779c12157c5c37ff2cade16047
Author: Cristy <urban-warrior@imagemagick.org>
Date: Tue Jun 30 19:41:18 2026 -0400
overflow check
diff --git a/coders/jnx.c b/coders/jnx.c
index a2c173bd3..26dd93269 100644
--- a/coders/jnx.c
+++ b/coders/jnx.c
@@ -284,7 +284,7 @@ static Image *ReadJNXImage(const ImageInfo *image_info,ExceptionInfo *exception)
images=DestroyImageList(images);
ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
}
- if (tile_length > (UINT_MAX-2))
+ if (HeapOverflowSanityCheckAddition(tile_length,2) != MagickFalse)
{
images=DestroyImageList(images);
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");