From 953cd881965c232bd71cdad8299892f4c3c5d8ee Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 1 Feb 2018 17:59:40 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5869 --- MagickCore/fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 954b69514..c62f56800 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1872,11 +1872,11 @@ static const char *FxOperatorPrecedence(const char *expression, size_t level; - c=0; + c=(-1); level=0; subexpression=(const char *) NULL; target=NullPrecedence; - while (*expression != '\0') + while ((c != '\0') && (*expression != '\0')) { precedence=UndefinedPrecedence; if ((isspace((int) ((unsigned char) *expression)) != 0) || (c == (int) '@')) -- 2.40.0