diff options
author | John Chen <jochen@microsoft.com> | 2016-10-10 09:39:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-10 09:39:08 -0700 |
commit | e197c9e3bdc5f047689f69878fcc9ff72c438482 (patch) | |
tree | d048194e8c12a5a6204bd2f269655cc481380eea /src/inc/fstring.h | |
parent | edc6bf9d65e84afb6425cd23ee12ca18c5029398 (diff) | |
download | coreclr-e197c9e3bdc5f047689f69878fcc9ff72c438482.tar.gz coreclr-e197c9e3bdc5f047689f69878fcc9ff72c438482.tar.bz2 coreclr-e197c9e3bdc5f047689f69878fcc9ff72c438482.zip |
Fix buffer length usage in UTF-8 to Unicode conversion (#7540)
These changes are ported from desktop CLR.
Diffstat (limited to 'src/inc/fstring.h')
-rw-r--r-- | src/inc/fstring.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inc/fstring.h b/src/inc/fstring.h index 68c9098c8f..9245885896 100644 --- a/src/inc/fstring.h +++ b/src/inc/fstring.h @@ -21,6 +21,9 @@ namespace FString { + // Note: All "length" parameters do not count the space for the null terminator. + // Caller of Unicode_Utf8 and Utf8_Unicode must pass in a buffer of size at least length + 1. + // Scan for ASCII only string, calculate result UTF8 string length HRESULT Unicode_Utf8_Length(__in_z LPCWSTR pString, __out bool * pAllAscii, __out DWORD * pLength); |