RFR: 8306707: Support pluggable image loading via javax.imageio [v9]
Michael Strauß
mstrauss at openjdk.org
Fri Nov 1 22:26:33 UTC 2024
On Fri, 1 Nov 2024 17:03:16 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> `ImageTools.computeDimensions()` will not allow the dimensions to be less than 0.
>
> An integer overflow doesn't necessarily cause the result to be negative. I echo Jay's comment, and suggest an explicit check. I note that the code already does that below but doesn't take `pixelScale` into account.
I've added `ImageTools.validateMaxDimensions()` to check that both width and height, as well as the byte array that later holds the image data doesn't exceed an int in size.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1593#discussion_r1826344473
More information about the openjfx-dev
mailing list