mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-25 11:24:54 +02:00
Move the MagickMin check to methods that get the value from the policy.
This commit is contained in:
+4
-5
@@ -1062,15 +1062,14 @@ static size_t GetMaxMemoryRequestFromPolicy(void)
|
||||
MinMemoryRequest,100.0));
|
||||
value=DestroyString(value);
|
||||
}
|
||||
return(max);
|
||||
return(MagickMin(max,(size_t) MAGICK_SSIZE_MAX));
|
||||
}
|
||||
|
||||
MagickExport size_t GetMaxMemoryRequest(void)
|
||||
{
|
||||
|
||||
if (max_memory_request == 0)
|
||||
max_memory_request=GetMaxMemoryRequestFromPolicy();
|
||||
return(MagickMin(max_memory_request,(size_t) MAGICK_SSIZE_MAX));
|
||||
return(max_memory_request);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1108,14 +1107,14 @@ static size_t GetMaxProfileSizeFromPolicy(void)
|
||||
max=StringToSizeType(value,100.0);
|
||||
value=DestroyString(value);
|
||||
}
|
||||
return(max);
|
||||
return(MagickMin(max,(size_t) MAGICK_SSIZE_MAX));
|
||||
}
|
||||
|
||||
MagickExport size_t GetMaxProfileSize(void)
|
||||
{
|
||||
if (max_profile_size == 0)
|
||||
max_profile_size=GetMaxProfileSizeFromPolicy();
|
||||
return(MagickMin(max_profile_size,(size_t) MAGICK_SSIZE_MAX));
|
||||
return(max_profile_size);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user