-
Bug
-
Resolution: Fixed
-
P3
-
17, 21, 22
-
b09
-
generic
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8317585 | 21.0.2 | Matthias Baesken | P3 | Resolved | Fixed | b03 |
JDK-8319289 | 17.0.10 | Matthias Baesken | P3 | Resolved | Fixed | b02 |
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.
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.
- backported by
-
JDK-8317585 Handle WideCharToMultiByte return values
- Resolved
-
JDK-8319289 Handle WideCharToMultiByte return values
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/8922e529
-
Commit openjdk/jdk21u/bd4e7067
-
Commit openjdk/jdk/d9559f9b
-
Review openjdk/jdk17u-dev/1928
-
Review openjdk/jdk21u/188
-
Review openjdk/jdk/15015
(3 links to)