JDK-8007606 : Handle realloc() failure in unix/native/libnet/net_util_md.c correctly
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2013-02-05
  • Updated: 2019-04-03
  • Resolved: 2019-01-16
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 13
13 b04Fixed
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/solaris/native/java/net/net_util_md.c
src/windows/native/java/net/NetworkInterface.c
src/windows/native/java/net/NetworkInterface_winXP.c
src/windows/native/sun/net/dns/ResolverConfigurationImpl.c


Comments
At this moment only realloc() problem in unix/native/libnet/net_util_md.c remains. All other issues mentioned in the description seem to be handled.
11-01-2019