diff --git a/coders/jnx.c b/coders/jnx.c
index d2d498c..44486c6 100644
--- a/coders/jnx.c
+++ b/coders/jnx.c
@@ -268,7 +268,7 @@
       /*
         Read a tile.
       */
-      blob=(unsigned char *) AcquireMagickMemory((tile_length+2)*sizeof(*blob));
+      blob=(unsigned char *) AcquireQuantumMemory(tile_length+2,sizeof(*blob));
       if (blob == (unsigned char *) NULL)
         {
           if (images != (Image *) NULL)