From b698d6b33c0099b205c2994256894ded9b7cbbce Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 30 Apr 2018 16:56:19 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8090 --- MagickCore/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.40.0