JDK-8203324 : Use out of scope in getMacOSXLocale of java_props_macosx.c:120
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 8,9,10,11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2018-05-16
  • Updated: 2019-10-04
  • Resolved: 2018-06-05
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 11 JDK 7 JDK 8 Other
11 b17Fixed 7u241Fixed 8u231Fixed openjdk8u232Fixed
Description
Use out of scope in getMacOSXLocale of java_props_macosx.c:120
Comments
Fix Request I'd like to request a backport of this to jdk8u, to increase buildability on newer toolchains. The original patch does not import cleanly, because another issue [1] partially addressed the problem. There are two buffers that have the same use-out-of-scope issue. My patch addresses both buffers. I am not suggesting backporting the entire fix for 8160199, as it could involve a change in behaviour to user code. Proposed modified webrev: http://cr.openjdk.java.net/~stooke/webrevs/jdk-8203324-jdk8u/webrev.01/webrev.jdk.01/ Discussion: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010073.html
20-08-2019

"languageString" variable was used outside of its scope. It happens to work since it is allocated on the calling stack, and only used within the call.
05-06-2018