diff --git a/MagickCore/draw.c b/MagickCore/draw.c
index b3ed819..b749b17 100644
--- a/MagickCore/draw.c
+++ b/MagickCore/draw.c
@@ -4194,7 +4194,7 @@
             target;
 
           Quantum
-            virtual_pixel[MaxPixelChannels];
+            virtual_pixel[CompositePixelChannel];
 
           (void) GetOneCacheViewVirtualPixel(image_view,x,y,virtual_pixel,
             exception);
@@ -4317,7 +4317,7 @@
             target;
 
           Quantum
-            virtual_pixel[MaxPixelChannels];
+            virtual_pixel[CompositePixelChannel];
 
           (void) GetOneCacheViewVirtualPixel(image_view,x,y,virtual_pixel,
             exception);