summaryrefslogtreecommitdiff
path: root/src/corefx
diff options
context:
space:
mode:
authorSteve Harter <sharter@microsoft.com>2016-04-06 12:11:21 -0500
committerSteve Harter <sharter@microsoft.com>2016-04-06 12:11:21 -0500
commit6fed3473fa61db50045bcfa413f9ace0891bf78a (patch)
tree91c53c0518281ae0db3d10a2e64ba0961d511c95 /src/corefx
parentfe089109148c370dffe238b6abbbd42c5dbafc99 (diff)
downloadcoreclr-6fed3473fa61db50045bcfa413f9ace0891bf78a.tar.gz
coreclr-6fed3473fa61db50045bcfa413f9ace0891bf78a.tar.bz2
coreclr-6fed3473fa61db50045bcfa413f9ace0891bf78a.zip
Avoid assert on buffer overflow
Diffstat (limited to 'src/corefx')
-rw-r--r--src/corefx/System.Globalization.Native/locale.cpp2
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.