From: Cristy Date: Sat, 19 May 2018 18:38:45 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-34~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b86a45c465e51f320f932515d16cc033baf5b81b;p=imagemagick ... --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 132ad5c3a..e6f3709d4 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -3172,7 +3172,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, continue; break; } - if ((size_t) (q-p-4+1) <= 0) + if ((q == (char *) NULL) || (p == (char *) NULL) || ((q-4) < p)) { status=MagickFalse; break;