From: Cristy Date: Mon, 30 Apr 2018 20:56:19 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8090 X-Git-Tag: 7.0.7-30~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b698d6b33c0099b205c2994256894ded9b7cbbce;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8090 --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 703a615f7..95cbd06d9 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1969,7 +1969,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (*draw_info->primitive != '@') primitive=AcquireString(draw_info->primitive); else - if (*(draw_info->primitive+1) != '-') + if ((strlen(draw_info->primitive) > 1) && + (*(draw_info->primitive+1) != '-')) primitive=FileToString(draw_info->primitive+1,~0UL,exception); if (primitive == (char *) NULL) return(MagickFalse);