RFR: 8365609: Fix several potential NULL native pointer dereferences in the desktop module [v4]
Artem Semenov
asemenov at openjdk.org
Mon Sep 1 10:24:59 UTC 2025
On Fri, 29 Aug 2025 16:30:40 GMT, Phil Race <prr at openjdk.org> wrote:
>> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixed indentation
>
> src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c line 324:
>
>> 322: sx, srcInfo->pixelStride,
>> 323: sy, srcInfo->scanStride);
>> 324: if (pf != NULL) {
>
> I don't think any of these changes in this file are necessary.
> pf is null IFF sw_surface == JNI_FALSE
> and iin that case, we never end the loop where pf is needed.
> Put another way, if you look at the call sites one
> is
> pf != null, srcOps == NULL, sw_surface == FALSE
> the other is
> pf == null, srcOps != NULL, sw_surface == TRUE
>
> and you can see that srcOps would have the same theoretical issue except that it would be a bug to call it with the wrong value of sw_surface.
> So revert all changes in this file.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26799#discussion_r2313549687
More information about the client-libs-dev
mailing list