diff options
author | Steve Harter <steveharter@users.noreply.github.com> | 2016-04-06 15:14:03 -0500 |
---|---|---|
committer | Steve Harter <steveharter@users.noreply.github.com> | 2016-04-06 15:14:03 -0500 |
commit | ae674a6e0550fee3884e536d8aeeaa83b8155d63 (patch) | |
tree | ef9121b26b8ef9ed35db1b391b3233bd314d02d4 | |
parent | cfdd790dcf0b1d613c1ddc33ff5c9e714c755745 (diff) | |
parent | 6fed3473fa61db50045bcfa413f9ace0891bf78a (diff) | |
download | coreclr-ae674a6e0550fee3884e536d8aeeaa83b8155d63.tar.gz coreclr-ae674a6e0550fee3884e536d8aeeaa83b8155d63.tar.bz2 coreclr-ae674a6e0550fee3884e536d8aeeaa83b8155d63.zip |
Merge pull request #4112 from steveharter/GlobalizationBufferO
Avoid debug assert on buffer overflow when obtaining invalid locale
-rw-r--r-- | src/corefx/System.Globalization.Native/locale.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corefx/System.Globalization.Native/locale.cpp b/src/corefx/System.Globalization.Native/locale.cpp index 9acf03a650..3b5c860270 100644 --- a/src/corefx/System.Globalization.Native/locale.cpp +++ b/src/corefx/System.Globalization.Native/locale.cpp @@ -67,7 +67,7 @@ int32_t GetLocale( char language[ULOC_LANG_CAPACITY]; uloc_getLanguage(localeNameTemp, language, ULOC_LANG_CAPACITY, err); - if (*err == U_STRING_NOT_TERMINATED_WARNING) + if (*err == U_BUFFER_OVERFLOW_ERROR || *err == U_STRING_NOT_TERMINATED_WARNING) { // ULOC_LANG_CAPACITY includes the null terminator, so if we couldn't extract the language with the null // terminator, the language must be invalid. |