Hi Brent, It looks OK to me.
Brian > On May 11, 2020, at 4:36 PM, Brent Christian <[email protected]> > wrote: > > Please review this small fix in Windows native code: > > Bug: https://bugs.openjdk.java.net/browse/JDK-8244767 > <https://bugs.openjdk.java.net/browse/JDK-8244767> > Webrev: http://cr.openjdk.java.net/~bchristi/8244767/webrev-00/ > <http://cr.openjdk.java.net/~bchristi/8244767/webrev-00/> > > As reported on this thread[1], the getEncodingInternal() function has a > potential unterminated string in the case that the GetLocaleInfo() Windows > function fails. In this case, the default switch() case will write "Cp" to > the beginning of the 'ret' buffer, but the rest of the buffer remains > uninitialized and unterminated. > > The fix is to strcpy() the default codepage into 'ret'.
