From 674f685b13fee671b07d278cb6e74e3fbcb7136e Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 8 Feb 2018 20:21:43 -0500 Subject: [PATCH] Eliminate hang on stdin --- MagickCore/draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 029cb904d..6f6f6860b 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1749,10 +1749,12 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, return(MagickFalse); if (image->debug != MagickFalse) (void) LogMagickEvent(DrawEvent,GetMagickModule(),"begin draw-image"); + primitive=(char *) NULL; if (*draw_info->primitive != '@') primitive=AcquireString(draw_info->primitive); else - primitive=FileToString(draw_info->primitive+1,~0UL,exception); + if (*(draw_info->primitive+1) != '-') + primitive=FileToString(draw_info->primitive+1,~0UL,exception); if (primitive == (char *) NULL) return(MagickFalse); primitive_extent=(double) strlen(primitive); -- 2.40.0