From: Cristy Date: Sat, 3 Feb 2018 21:07:28 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5356 X-Git-Tag: 7.0.7-23~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=716ddbbe03377681a304661bdf0e7e3271ccfc92;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5356 --- diff --git a/MagickCore/option.c b/MagickCore/option.c index d0a780cee..6b6cd36ce 100644 --- a/MagickCore/option.c +++ b/MagickCore/option.c @@ -3009,7 +3009,7 @@ MagickExport ssize_t ParseCommandOption(const CommandOption option, if (LocaleCompare(token,option_info[i].mnemonic) == 0) break; command_info=option_info+i; - if ((command_info->mnemonic == (const char *) NULL) && + if ((command_info->mnemonic == (const char *) NULL) && (*token != '\0') && ((strchr(token+1,'-') != (char *) NULL) || (strchr(token+1,'_') != (char *) NULL))) {