From: Cristy Date: Fri, 12 May 2017 16:38:37 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.5-6~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93719041ac7d7b9d2636efd6ac1dd7b2d7c3c094;p=imagemagick ... --- diff --git a/MagickCore/vision.c b/MagickCore/vision.c index 630cd4ea9..f8e1c1152 100644 --- a/MagickCore/vision.c +++ b/MagickCore/vision.c @@ -280,14 +280,14 @@ MagickExport Image *ConnectedComponentsImage(const Image *image, Is neighbor an authentic pixel and a different color than the pixel? */ GetPixelInfoPixel(image,p,&pixel); - neighbor_offset=dy*(GetPixelChannels(image)*image->columns)+dx* - GetPixelChannels(image); if (((x+dx) < 0) || ((x+dx) >= (ssize_t) image->columns) || ((y+dy) < 0) || ((y+dy) >= (ssize_t) image->rows)) { p+=GetPixelChannels(image); continue; } + neighbor_offset=dy*(GetPixelChannels(image)*image->columns)+dx* + GetPixelChannels(image); GetPixelInfoPixel(image,p+neighbor_offset,&target); if (IsFuzzyEquivalencePixelInfo(&pixel,&target) == MagickFalse) {