- Fixed by checking for `NULL` pointer after memory allocation.
- In `NativeVideoBuffer` `std::nothrow` was added when allocating `jint` array, 
so `new` will return `NULL` instead of throwing exception. This done for 
consistency and also it is not clear how well JNI handles C++ exceptions in 
this case and what value will Java code get if exception is thrown.

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

Commit messages:
 - 8313900: Possible NULL pointer access in NativeAudioSpectrum and 
NativeVideoBuffer

Changes: https://git.openjdk.org/jfx/pull/1204/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1204&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313900
  Stats: 13 lines in 2 files changed: 11 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/1204.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1204/head:pull/1204

PR: https://git.openjdk.org/jfx/pull/1204

Reply via email to