Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8007606

Handle realloc() failure in unix/native/libnet/net_util_md.c correctly

XMLWordPrintable

    • b04
    • windows
    • Not verified

      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

            igerasim Ivan Gerasimov
            jzavgren John Zavgren (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: