Commit 13311b1ec for imagemagick.org

commit 13311b1ecde3e423659599f2deb146208f8893d6
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Wed Nov 4 06:39:00 2026 +0100

    Code cleanup.

diff --git a/coders/xcf.c b/coders/xcf.c
index 8e51dc729..dcaa75414 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -1115,7 +1115,7 @@ static MagickBooleanType ReadOneLayer(const ImageInfo *image_info,Image* image,
 static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
 {
   char
-    magick[14+1];
+    magick[15];

   Image
     *image;
@@ -1158,11 +1158,11 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  count=ReadBlob(image,14,(unsigned char *) magick);
-  if ((count != 14) ||
+  count=ReadBlob(image,sizeof(magick)-1,(unsigned char *) magick);
+  if ((count != sizeof(magick)-1) ||
       (LocaleNCompare((char *) magick,"gimp xcf",8) != 0))
     ThrowReaderException(CorruptImageError,"ImproperImageHeader");
-  magick[14]='\0';
+  magick[sizeof(magick)-1]='\0';
   (void) memset(&doc_info,0,sizeof(XCFDocInfo));
   doc_info.version=StringToUnsignedLong(magick+10);
   doc_info.width=ReadBlobMSBLong(image);