#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
-# define MagickLLConstant(c) (MagickOffsetType) (c ## i64)
-# define MagickULLConstant(c) (MagickSizeType) (c ## ui64)
+# define MagickLLConstant(c) ((MagickOffsetType) (c ## i64))
+# define MagickULLConstant(c) ((MagickSizeType) (c ## ui64))
#else
-# define MagickLLConstant(c) (MagickOffsetType) (c ## LL)
-# define MagickULLConstant(c) (MagickSizeType) (c ## ULL)
+# define MagickLLConstant(c) ((MagickOffsetType) (c ## LL))
+# define MagickULLConstant(c) ((MagickSizeType) (c ## ULL))
#endif
#if MAGICKCORE_SIZEOF_FLOAT_T == 0
MagickSizeType
limit;
+ if ((MagickOffsetType) size < 0)
+ return(MagickFalse);
status=MagickFalse;
logging=IsEventLogging();
if (resource_semaphore == (SemaphoreInfo *) NULL)
}
case MemoryResource:
{
+ if ((resource_info.memory+(MagickOffsetType) size) < 0)
+ return(MagickFalse);
resource_info.memory+=(MagickOffsetType) size;
limit=resource_info.memory_limit;
if ((limit == MagickResourceInfinity) ||
}
case MapResource:
{
+ if ((resource_info.map+(MagickOffsetType) size) < 0)
+ return(MagickFalse);
resource_info.map+=(MagickOffsetType) size;
limit=resource_info.map_limit;
if ((limit == MagickResourceInfinity) ||
}
case DiskResource:
{
+ if ((resource_info.disk+(MagickOffsetType) size) < 0)
+ return(MagickFalse);
resource_info.disk+=(MagickOffsetType) size;
limit=resource_info.disk_limit;
if ((limit == MagickResourceInfinity) ||
}
case FileResource:
{
+ if ((resource_info.file+(MagickOffsetType) size) < 0)
+ return(MagickFalse);
resource_info.file+=(MagickOffsetType) size;
limit=resource_info.file_limit;
if ((limit == MagickResourceInfinity) ||
}
case TimeResource:
{
+ if ((resource_info.time+(MagickOffsetType) size) < 0)
+ return(MagickFalse);
resource_info.time+=(MagickOffsetType) size;
limit=resource_info.time_limit;
if ((limit == MagickResourceInfinity) ||