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

Use GetTempPath2 API instead of GetTempPath

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • None
    • hotspot
    • generic
    • windows

    Description

      Use the `GetTempPath2` APIs instead of the `GetTempPath` APIs in native code across the OpenJDK repository to retrieve the temporary directory path, as `GetTempPath2` provides enhanced security. While `GetTempPath` may still function without errors, using `GetTempPath2` reduces the risk of potential exploits for users.

      Note that `GetTempPath2` is only available on Windows 11 and later. Therefore, you should load it dynamically and fall back to `GetTempPath` if `GetTempPath2` is not available.

      Attachments

        Issue Links

          Activity

            People

              dhanalla Dhamoder Nalla
              dhanalla Dhamoder Nalla
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: