JDK-8007607 : security native code doesn't always use malloc, realloc, and calloc correctly
  • Type: Bug
  • Component: security-libs
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-02-05
  • Updated: 2018-03-21
  • Resolved: 2013-03-19
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 7 JDK 8 Other
7u171Fixed 8 b84Fixed openjdk7uFixed
Related Reports
Duplicate :  
Description
The return value of realloc must be checked to determine if the reallocation succeeded. The pointer to the original memory must be stored so that in the event that realloc fails, then the original memory can be freed. 
Also the return value of malloc (and calloc) must be checked for failure.

The following files are effected:
src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
src/share/native/sun/security/jgss/wrapper/NativeUtil.c
src/share/native/sun/security/smartcardio/pcsc.c
src/solaris/native/com/sun/security/auth/module/Solaris.c
src/solaris/native/com/sun/security/auth/module/Unix.c

Comments
can't verify this effect of this change in SQE environment.
22-04-2013