On 2025-12-02 23:46, Brian Lindholm wrote:
I've stumbled across an integer overflow bug in imlib2-1.12.5, which I
discovered while experimenting with the "hsetroot" utility (from
https://github.com/himdel/hsetroot; it utilizes imlib2 internally).
The problem can be demonstrated with the following command line:
hsetroot -add black -add white -add black -add white -add black -add \
white -add black -add white -add black -add white -add black -add \
white -gradient 45
With straight imlib2-1.12.5, I get a bar on the left side of the screen
that is not filled correctly (per the attached orig.png file). It only
happens on my QHD monitor (2560x1440 pixels), and I'm pretty sure it's
an integer overload issue. If I strategically cast (int) to (unsigned
long int) in a few places so that 64-bit ints are used, the problem goes
away.
Hello Brian,
I have pushed a fix, basically as suggested, but using uint64_t instead
of unsigned long. This should fix things on 32 bit arches too.
I'll be back on the other issue when time permits.
Thanks :)
/Kim
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel