GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeNodeNestedTooDeeply","`%s'",token);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
#define NotEqualOperator 0xfaU
#define LogicalAndOperator 0xfbU
#define LogicalOrOperator 0xfcU
-#define ExponentialNotation 0xfdU
+#define ExponentialNotation 0xfdU
struct _FxInfo
{
*p;
*beta=0.0;
+ if (*depth > MagickMaxRecursionDepth)
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
+ "UnableToParseExpression","`%s'",expression);
+ return(0.0);
+ }
if (exception->severity >= ErrorException)
return(0.0);
while (isspace((int) ((unsigned char) *expression)) != 0)
# define MAGICKCORE_LOCALE_SUPPORT
#endif
#define LocaleFilename "locale.xml"
-#define MaxRecursionDepth 200
\f
/*
Static declarations.
}
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
attribute=GetXMLTreeAttribute(include,"file");
if (attribute != (const char *) NULL)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",filename);
else
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
else
/*
Magick defines.
*/
+#define MagickMaxRecursionDepth 1024
#define Swap(x,y) ((x)^=(y), (y)^=(x), (x)^=(y))
#if defined(_MSC_VER)
# define DisableMSCWarning(nr) __pragma(warning(push)) \
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
- if (depth > 200)
+ if (depth > MagickMaxRecursionDepth)
(void) ThrowMagickException(exception,GetMagickModule(),
ConfigureError,"IncludeNodeNestedTooDeeply","`%s'",token);
else