> The gcc static analyzer reports this issue : > > `src/java.desktop/unix/native/common/java2d/x11/X11Renderer.c:86:17: warning: > use of possibly-NULL 'malloc((long unsigned int)newMax * 4)' where non-null > expected [CWE-690] [-Wanalyzer-possible-null-argument]` > > Seems we miss NULL checks in the XDHD_ADD_POINT macro (for malloc). > > While at it, should I NULL check realloc too? > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: FD_ADD_POINT - indicate alloc failure by using ProcessHandler resultCode ------------- Changes: - all: https://git.openjdk.org/jdk/pull/33513/files - new: https://git.openjdk.org/jdk/pull/33513/files/2cb791e1..89c2a0f7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=33513&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33513&range=02-03 Stats: 20 lines in 2 files changed: 10 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/33513.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33513/head:pull/33513 PR: https://git.openjdk.org/jdk/pull/33513
