From 3072a1082750ce43474c97ae971b51f7922721a1 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 3 Sep 2022 15:47:39 -0400 Subject: [PATCH] validate stroke width --- magick/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magick/draw.c b/magick/draw.c index 0625fa0215..8fcefa5afc 100644 --- a/magick/draw.c +++ b/magick/draw.c @@ -3782,7 +3782,8 @@ static MagickBooleanType RenderMVGContent(Image *image, if (graphic_context[n]->clip_path != MagickFalse) break; graphic_context[n]->stroke_width=GetDrawValue(token,&next_token); - if (token == next_token) + if ((token == next_token) || + (graphic_context[n]->stroke_width < 0.0)) ThrowPointExpectedException(image,token); break; }