This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository legacy-imlib2.
View the commit online.
commit c30f8528585f86fa0dfe68f391251e23187d662a
Author: Kim Woelders <[email protected]>
AuthorDate: Wed Dec 3 18:38:07 2025 +0100
gradients: Fix rendering of gradients in larger images
The color table was generated incorrectly due to integer overflows.
Patch by Brian Lindholm (tweaked).
---
src/lib/grad.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/grad.c b/src/lib/grad.c
index d7b0efa..5afd08f 100644
--- a/src/lib/grad.c
+++ b/src/lib/grad.c
@@ -319,22 +319,22 @@ _DrawGradient(ImlibImage *im, int x, int y, int w, int h,
if (xx < 0)
{
for (i = 0; i < ww; i++)
- hlut[i] = (-xx * (ww - 1 - i) * len) / divw;
+ hlut[i] = (-xx * (ww - 1 - i) * (uint64_t) len) / divw;
}
else
{
for (i = 0; i < ww; i++)
- hlut[i] = (xx * i * len) / divw;
+ hlut[i] = (xx * i * (uint64_t) len) / divw;
}
if (yy < 0)
{
for (i = 0; i < hh; i++)
- vlut[i] = (-yy * (hh - 1 - i) * len) / divh;
+ vlut[i] = (-yy * (hh - 1 - i) * (uint64_t) len) / divh;
}
else
{
for (i = 0; i < hh; i++)
- vlut[i] = (yy * i * len) / divh;
+ vlut[i] = (yy * i * (uint64_t) len) / divh;
}
jump = im->w - w;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.