diff --git a/internal/cgen/base/image-public.h b/internal/cgen/base/image-public.h index 37fc8061..a890e5e6 100644 --- a/internal/cgen/base/image-public.h +++ b/internal/cgen/base/image-public.h @@ -651,7 +651,7 @@ wuffs_base__pixel_config__set(wuffs_base__pixel_config* c, } if (pixfmt_repr) { do { -#if SIZE_MAX < UINT64_MAX +#if SIZE_MAX < 0xFFFFFFFFFFFFFFFFull uint64_t wh = ((uint64_t)width) * ((uint64_t)height); // TODO: handle things other than 1 byte per pixel. if (wh > ((uint64_t)SIZE_MAX)) { diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index b3c4abb2..8ca2471e 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -4664,7 +4664,7 @@ wuffs_base__pixel_config__set(wuffs_base__pixel_config* c, } if (pixfmt_repr) { do { -#if SIZE_MAX < UINT64_MAX +#if SIZE_MAX < 0xFFFFFFFFFFFFFFFFull uint64_t wh = ((uint64_t)width) * ((uint64_t)height); // TODO: handle things other than 1 byte per pixel. if (wh > ((uint64_t)SIZE_MAX)) {