On Fri, 1 Nov 2024 17:03:16 GMT, Kevin Rushforth <k...@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