From: Cristy Date: Sun, 15 Jan 2017 00:20:37 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.4-5~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8787f9cc1f73e8f2ac27362e3e9b920da4fa1df;p=imagemagick ... --- diff --git a/MagickCore/vision.c b/MagickCore/vision.c index 6c4d58d3a..53ebd5b74 100644 --- a/MagickCore/vision.c +++ b/MagickCore/vision.c @@ -388,11 +388,11 @@ MagickExport Image *ConnectedComponentsImage(const Image *image, } if (x < object[id].bounding_box.x) object[id].bounding_box.x=x; - if (x > (ssize_t) object[id].bounding_box.width) + if (x >= (ssize_t) object[id].bounding_box.width) object[id].bounding_box.width=(size_t) x; if (y < object[id].bounding_box.y) object[id].bounding_box.y=y; - if (y > (ssize_t) object[id].bounding_box.height) + if (y >= (ssize_t) object[id].bounding_box.height) object[id].bounding_box.height=(size_t) y; object[id].color.red+=GetPixelRed(image,p); object[id].color.green+=GetPixelGreen(image,p);