From a3e7c388d53675048795384c64084da989277421 Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 12 Mar 2010 17:54:07 +0000 Subject: [PATCH] --- magick/transform.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/magick/transform.c b/magick/transform.c index 3026c8154..90aaa4f30 100644 --- a/magick/transform.c +++ b/magick/transform.c @@ -1149,9 +1149,6 @@ static inline MagickBooleanType CopyImageRegion(Image *destination, register IndexPacket *restrict destination_indexes; - register long - x; - register PixelPacket *restrict q; @@ -1168,13 +1165,13 @@ static inline MagickBooleanType CopyImageRegion(Image *destination, continue; } indexes=GetCacheViewVirtualIndexQueue(source_view); - for (x=0; x < (long) columns; x++) - *q++=(*p++); + (void) CopyMagickMemory(q,p,(size_t) columns*sizeof(*p)); if (indexes != (IndexPacket *) NULL) { destination_indexes=GetCacheViewAuthenticIndexQueue(destination_view); - for (x=0; x < (long) columns; x++) - destination_indexes[x]=indexes[x]; + if (destination_indexes != (IndexPacket *) NULL) + (void) CopyMagickMemory(destination_indexes,indexes,(size_t) + columns*sizeof(*indexes)); } sync=SyncCacheViewAuthenticPixels(destination_view,exception); if (sync == MagickFalse) -- 2.40.0