From fb0b79d7df6e839d81397f24ada6763e4de39581 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 7 Apr 2018 09:16:55 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7428 --- MagickCore/token.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/token.c b/MagickCore/token.c index dc97605be..7f7533272 100644 --- a/MagickCore/token.c +++ b/MagickCore/token.c @@ -366,8 +366,6 @@ MagickExport MagickBooleanType GlobExpression(const char *expression, return(MagickTrue); if (GetUTFCode(pattern) == 0) return(MagickTrue); - while (GetUTFCode(pattern) == '*') - pattern+=GetUTFOctets(pattern); if (LocaleCompare(pattern,"*") == 0) return(MagickTrue); p=pattern+strlen(pattern)-1; @@ -398,6 +396,8 @@ MagickExport MagickBooleanType GlobExpression(const char *expression, Evaluate glob expression. */ done=MagickFalse; + while (GetUTFCode(pattern) == '*') + pattern+=GetUTFOctets(pattern); while ((GetUTFCode(pattern) != 0) && (done == MagickFalse)) { if (GetUTFCode(expression) == 0) -- 2.40.0