LE GARREC Vincent <[email protected]> writes:
> So, what should I do ? Is it okay to make a cast for every multiplication
> of stride by height ?
There are a couple of things that have to be kept in mind:
- The stride can be negative (this corresponds to the lines of the image
being stored upside down), so storing or casting the stride to size_t
probably won't work.
- Even if you fix the multiplication issues, has limitations in other
places that prevents access to large images working well. See
https://bugs.freedesktop.org/show_bug.cgi?id=46277
for example. Fixing the multiplications may still be worthwhile
though, since we may some day get large images working.
> I'm asking because I don't want to work on a patch that will be denied
> because my solution is wrong.
I don't know what the best way to do it is, but requiring all rowstride
multiplications to have a cast probably isn't going to be maintainable,
because people will forget about it when writing new code.
Søren
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman