From: dirk Date: Sat, 23 Jul 2016 11:05:55 +0000 (+0200) Subject: Added check for channel mask when setting the pixel. X-Git-Tag: 7.0.2-6~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a9b26e5bfa6dc834b2d3eb0729123c40479de5c;p=imagemagick Added check for channel mask when setting the pixel. --- diff --git a/MagickCore/image.c b/MagickCore/image.c index 730b16df3..a8e98f870 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -1113,6 +1113,7 @@ MagickExport MagickBooleanType CopyImagePixels(Image *image, PixelTrait traits=GetPixelChannelTraits(image,channel); PixelTrait source_traits=GetPixelChannelTraits(source_image,channel); if ((traits == UndefinedPixelTrait) || + ((traits & UpdatePixelTrait) == 0) || (source_traits == UndefinedPixelTrait)) continue; SetPixelChannel(image,channel,p[i],q);