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

Handle WideCharToMultiByte return values

    XMLWordPrintable

Details

    • b09
    • generic
    • windows

    Backports

      Description

        The function WideCharToMultiByte is used at a number of places of the JDK codebase for conversion purposes.
        Unfortunately, the function might fail because of various reasons, so the return value must be checked to avoid undefined behavior or even crashes.
        see
        https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte
        especially
        https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte#return-value

        At most places in the coding the return values are already checked, but some are missing.

        Attachments

          Issue Links

            Activity

              People

                mbaesken Matthias Baesken
                mbaesken Matthias Baesken
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: