summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuqun Lou <luqunl@users.noreply.github.com>2018-06-27 03:16:16 (GMT)
committerJan Kotas <jkotas@microsoft.com>2018-06-27 03:16:16 (GMT)
commit5b4773ecc3c9e4d773b7aba3cd89cf34c0fe0f99 (patch)
treeef173f8f46d9b7aee06d4365f17225799dd1c127 /src
parentd644d8a7d9484f994d75b02fde99393707b280de (diff)
downloadcoreclr-5b4773ecc3c9e4d773b7aba3cd89cf34c0fe0f99.zip
coreclr-5b4773ecc3c9e4d773b7aba3cd89cf34c0fe0f99.tar.gz
coreclr-5b4773ecc3c9e4d773b7aba3cd89cf34c0fe0f99.tar.bz2
AssemblyName parsing with unicode/emoji crashes (#18309)
Diffstat (limited to 'src')
-rw-r--r--src/pal/src/locale/utf8.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/src/locale/utf8.cpp b/src/pal/src/locale/utf8.cpp
index d797f45..4688cf0 100644
--- a/src/pal/src/locale/utf8.cpp
+++ b/src/pal/src/locale/utf8.cpp
@@ -1863,7 +1863,7 @@ public:
if (ch > 0x7F)
goto ProcessChar;
- *pTarget = (char)ch;
+ *pTarget = (WCHAR)ch;
pTarget++;
}
// we are done
@@ -1899,7 +1899,7 @@ public:
if (ch > 0x7F) {
goto LongCode;
}
- *pTarget = (char)ch;
+ *pTarget = (WCHAR)ch;
pTarget++;
}
@@ -2022,7 +2022,7 @@ public:
ch = (chc << 6) | (ch & 0x3F);
- *pTarget = (char)(((ch >> 10) & 0x7FF) +
+ *pTarget = (WCHAR)(((ch >> 10) & 0x7FF) +
(SHORT)(CharUnicodeInfo::HIGH_SURROGATE_START - (0x10000 >> 10)));
pTarget++;