mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-25 11:24:54 +02:00
This commit is contained in:
+12
-2
@@ -2249,12 +2249,22 @@ static MagickBooleanType GetOperand (
|
||||
}
|
||||
return MagickTrue;
|
||||
} else if (OprIsUnaryPrefix (op)) {
|
||||
MagickBooleanType operand_ok;
|
||||
if (!PushOperatorStack (pfx, (int) op)) return MagickFalse;
|
||||
pfx->pex++;
|
||||
SkipSpaces (pfx);
|
||||
if (!*pfx->pex) return MagickFalse;
|
||||
|
||||
if (!GetOperand (pfx, UserSymbol, NewUserSymbol, UserSymNdx, needPopAll)) {
|
||||
if (pfx->teDepth >= MagickMaxRecursionDepth) {
|
||||
(void) ThrowMagickException (
|
||||
pfx->exception, GetMagickModule(), OptionError,
|
||||
"Expression too deeply nested", "(depth %i exceeds limit %i)",
|
||||
pfx->teDepth, MagickMaxRecursionDepth);
|
||||
return MagickFalse;
|
||||
}
|
||||
pfx->teDepth++;
|
||||
operand_ok=GetOperand (pfx, UserSymbol, NewUserSymbol, UserSymNdx, needPopAll);
|
||||
pfx->teDepth--;
|
||||
if (!operand_ok) {
|
||||
(void) ThrowMagickException (
|
||||
pfx->exception, GetMagickModule(), OptionError,
|
||||
"After unary, bad operand at", "'%s'",
|
||||
|
||||
Reference in New Issue
Block a user