JDK-6989972 : JDK_GetVersionInfo0 fails to zero structure
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-06
  • Updated: 2014-02-26
  • Resolved: 2011-01-25
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 6
6u25 b01Fixed
Related Reports
Relates :  
Description
JDK's JDK_GetVersionInfo0 is not clearing the structure it fills in, which can leave bits describing new features set to true.

Comments
This one was spotted, and fixed, when addressing compiler warnings in 6989466. I'm adding the 7-na keyword here so that when it is fixed in jdk6, it doesn't appear on the list to be forward ported to 7.
26-02-2014

EVALUATION As comments.
08-10-2010

SUGGESTED FIX (5.10)$ hg diff src/share/native/common/jdk_util.c diff --git a/src/share/native/common/jdk_util.c b/src/share/native/common/jdk_util.c --- a/src/share/native/common/jdk_util.c +++ b/src/share/native/common/jdk_util.c @@ -76,7 +76,7 @@ JDK_GetVersionInfo0(jdk_version_info* in } - memset(info, 0, sizeof(info_size)); + memset(info, 0, info_size); info->jdk_version = ((jdk_major_version & 0xFF) << 24) | ((jdk_minor_version & 0xFF) << 16) | ((jdk_micro_version & 0xFF) << 8) |
06-10-2010