JDK-8362954 : Missing error buffer null check in os::dll_load on Linux/BSD
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,os_x
  • Submitted: 2025-07-21
  • Updated: 2025-07-25
  • Resolved: 2025-07-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b08Fixed
Related Reports
Relates :  
Description
Spotted whilst fixing a larger issue on Windows (JDK-8362846):

BSD: 
  int diag_msg_max_length=ebuflen-strlen(ebuf);

Linux: 
  size_t prefix_len = strlen(ebuf);
   ssize_t diag_msg_max_length = ebuflen - prefix_len;

Code has been present since before JDK 8. Fortunately we don't pass null error buffers on these platforms.
Comments
Changeset: 0735dc27 Branch: master Author: David Holmes <dholmes@openjdk.org> Date: 2025-07-23 00:36:35 +0000 URL: https://git.openjdk.org/jdk/commit/0735dc27c71de46896afd2f0f608319304a3d549
23-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26420 Date: 2025-07-22 00:31:39 +0000
22-07-2025