The defect has been detected and confirmed in the function 
OGLBlitToSurfaceViaTexture() located in the file 
src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c with static 
code analysis. This defect can potentially lead to a null pointer dereference.

The pointer pf is dereferenced in line 324 without checking for nullptr, 
although earlier in line 274 the same pointer is checked for nullptr, which 
indicates that it can be null.

According to 
[this](https://github.com/openjdk/jdk/pull/26002#issuecomment-3023050372) 
comment, this PR contains fixes for similar cases in other places.

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

Commit messages:
 - The same issue is present in 
src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c gtk3_load()
 - The same issue is present in 
src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c 
SplashDecodeGif()
 - The same issue is present in 
src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c 
OGLBlitSwToTexture()
 - 8365609 Null pointer dereference in 
src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c 
OGLBlitToSurfaceViaTexture()

Changes: https://git.openjdk.org/jdk/pull/26799/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26799&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365609
  Stats: 19 lines in 3 files changed: 9 ins; 0 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/26799.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26799/head:pull/26799

PR: https://git.openjdk.org/jdk/pull/26799

Reply via email to