From: Cristy Date: Wed, 24 Jan 2018 11:58:58 +0000 (-0500) Subject: Eliminate stack-buffer-overflow X-Git-Tag: 7.0.7-23~285 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9a75ec387eb3c1f3c9584b97260d72512868b1b;p=imagemagick Eliminate stack-buffer-overflow Credit OSS Fuzz --- diff --git a/MagickCore/token.c b/MagickCore/token.c index 59bbdc3d5..2f1bf4c53 100644 --- a/MagickCore/token.c +++ b/MagickCore/token.c @@ -300,7 +300,7 @@ MagickExport void GetNextToken(const char *start,const char **end, } } token[i]='\0'; - if ((LocaleNCompare(token,"url(",4) == 0) && (strlen(token) > 4)) + if ((LocaleNCompare(token,"url(",4) == 0) && (strlen(token) > 5)) { ssize_t offset;