Commit 1ec93e45d for imagemagick.org
commit 1ec93e45dc4f4c76dbd28edfe542891d5e8a9851
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sun Oct 18 08:47:51 2026 -0400
buffer clone nexus
diff --git a/MagickCore/cache.c b/MagickCore/cache.c
index c9c9ff91d..af3c553e2 100644
--- a/MagickCore/cache.c
+++ b/MagickCore/cache.c
@@ -818,7 +818,7 @@ static MagickBooleanType ClonePixelCacheRepository(
if (status == MagickFalse)
continue;
pixels=SetPixelCacheNexusPixels(clone_info,WriteMode,0,y,
- clone_info->columns,1,MagickFalse,clone_nexus[id],exception);
+ clone_info->columns,1,MagickTrue,clone_nexus[id],exception);
if (pixels == (Quantum *) NULL)
continue;
(void) memset(clone_nexus[id]->pixels,0,(size_t) clone_nexus[id]->length);
@@ -856,7 +856,7 @@ static MagickBooleanType ClonePixelCacheRepository(
channel=clone_info->channel_map[i].channel;
traits=cache_info->channel_map[channel].traits;
if (traits != UndefinedPixelTrait)
- *q=*(p+cache_info->channel_map[channel].offset);
+ *q=(*(p+cache_info->channel_map[channel].offset));
q++;
}
p+=(ptrdiff_t) cache_info->number_channels;
@@ -896,7 +896,7 @@ static MagickBooleanType ClonePixelCacheRepository(
if (status == MagickFalse)
continue;
pixels=SetPixelCacheNexusPixels(clone_info,WriteMode,0,y,
- clone_info->columns,1,MagickFalse,clone_nexus[id],exception);
+ clone_info->columns,1,MagickTrue,clone_nexus[id],exception);
if (pixels == (Quantum *) NULL)
continue;
if ((clone_nexus[id]->metacontent != (void *) NULL) &&
@@ -5182,6 +5182,8 @@ static inline MagickBooleanType AcquireCacheNexusPixels(
const CacheInfo *magick_restrict cache_info,const MagickSizeType length,
NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception)
{
+ nexus_info->length=0;
+ nexus_info->mapped=MagickFalse;
if (length != (MagickSizeType) ((size_t) length))
{
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -5189,8 +5191,6 @@ static inline MagickBooleanType AcquireCacheNexusPixels(
cache_info->filename);
return(MagickFalse);
}
- nexus_info->length=0;
- nexus_info->mapped=MagickFalse;
if (cache_anonymous_memory <= 0)
{
nexus_info->cache=(Quantum *) MagickAssumeAligned(AcquireAlignedMemory(1,