RFR: 8363676: [GCC static analyzer] missing return value check of malloc in OGLContext_SetTransform

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jul 28 10:07:57 UTC 2025


On Wed, 23 Jul 2025 13:50:37 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> When using the GCC static analyzer (-fanalyzer) the following issue is reported :
> `src/java.desktop/share/native/common/java2d/opengl/OGLContext.c:487:9: warning: use of possibly-NULL '*oglc.xformMatrix' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]`
> 
> Seems we miss a NULL check of the return value of malloc (at most other places in the coding we do it).

Marked as reviewed by psadhukhan (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/26443#pullrequestreview-3061709330


More information about the client-libs-dev mailing list