Commit 3d7901eae for imagemagick.org
commit 3d7901eae3c2b3cfb3331f481ffbe6597c4f6c2a
Author: tomotomo <tomoppeko@gmail.com>
Date: Tue Nov 10 01:20:13 2026 +0900
Fix signed/unsigned comparison in ReadLibRawProfiles() that breaks the Windows build (#9113)
942452758 compares a MagickOffsetType with the MagickSizeType returned by
GetBlobSize(), which MSVC reports as C4018 and the Windows build treats as
an error. Cast to MagickSizeType as the other coders do.
diff --git a/coders/dng.c b/coders/dng.c
index cfc5d5649..5466bacdf 100644
--- a/coders/dng.c
+++ b/coders/dng.c
@@ -410,7 +410,7 @@ static void ReadLibRawProfiles(Image *image,const libraw_data_t *raw_info,
*profile;
if ((raw_info->color.profile != NULL) &&
- ((MagickOffsetType) raw_info->color.profile_length <= GetBlobSize(image)))
+ ((MagickSizeType) raw_info->color.profile_length <= GetBlobSize(image)))
{
profile=BlobToProfileStringInfo("icc",raw_info->color.profile,
raw_info->color.profile_length,exception);
@@ -418,7 +418,7 @@ static void ReadLibRawProfiles(Image *image,const libraw_data_t *raw_info,
}
#if LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(0,18)
if ((raw_info->idata.xmpdata != NULL) &&
- ((MagickOffsetType) raw_info->idata.xmplen <= GetBlobSize(image)))
+ ((MagickSizeType) raw_info->idata.xmplen <= GetBlobSize(image)))
{
profile=BlobToProfileStringInfo("xmp",raw_info->idata.xmpdata,
raw_info->idata.xmplen,exception);