On Mon, 8 Jul 2024 13:39:49 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:

> The parameter "offset" is not validated in the 2 native methods getRGBImpl() 
> and setRGBImpl() of com.sun.pisces.AbstractSurface (in JAbstractSurface.c).
> The PR adds the "offset < 0" check to both the methods.

The fix looks good with one suggestion to expand it.

Thank you for filing [JDK-8335879](https://bugs.openjdk.org/browse/JDK-8335879) 
as a further follow-up. I recommend to change `dstX` and `dstY` to `const`  
variables as part of this PR, since we rely on them being non-negative. The 
follow-on bug would then be to remove those variables entirely, if we decide it 
is even worth doing.

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

PR Comment: https://git.openjdk.org/jfx/pull/1497#issuecomment-2214817770

Reply via email to