On Tue, 26 May 2026 17:51:57 GMT, Phil Race <[email protected]> wrote:

>> src/java.desktop/share/classes/java/awt/image/Raster.java line 228:
>> 
>>> 226:         if (slsz > Integer.MAX_VALUE) {
>>> 227:             throw new IllegalArgumentException("width * bands is too 
>>> large");
>>> 228:         }
>> 
>> Is it still possible that `w*h*bands > Integer.MAX_VALUE` while neither 
>> `w*h` nor `w*bands` overflow?
>
> Yes. That's what the 3rd case in the test checks.
> The spec change above covers it but the actual validation is done in the 
> called method
> java.lang.IllegalArgumentException: size too large to store image
>       at 
> java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:320)

I see. Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31014#discussion_r3306451348

Reply via email to