Commit 47ca72105 for imagemagick.org
commit 47ca7210515f3c9ea033b86fe4323a70caa74468
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Jun 5 11:21:28 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pjxj-pchx-4c3m
diff --git a/coders/xcf.c b/coders/xcf.c
index fb2cc9e68..93fddf901 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -753,7 +753,7 @@ static MagickBooleanType load_level(Image *image,XCFDocInfo *inDocInfo,
/* if the offset is 0 then we need to read in the maximum possible
allowing for negative compression */
if (offset2 == 0)
- offset2=(MagickOffsetType) (offset + TILE_WIDTH * TILE_WIDTH * 4* 1.5);
+ offset2=(MagickOffsetType) (offset+TILE_WIDTH*TILE_WIDTH*(3*4)/2);
/* seek to the tile offset */
if ((offset > offset2) || (SeekBlob(image, offset, SEEK_SET) != offset))
ThrowBinaryException(CorruptImageError,"InsufficientImageDataInFile",