Fix call to GetSortHandle (dotnet/coreclr#4882)
authorMatt Ellis <matell@microsoft.com>
Tue, 10 May 2016 05:33:20 +0000 (22:33 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 10 May 2016 05:33:20 +0000 (22:33 -0700)
commit6975ed2cccc43b1ef7daa18a75a507d495454873
treeff7debeb1abbff1b47c2795c819d40365e20345c
parent69a7f0c9f22328b0ea97efee4432d07d1b37b9ac
Fix call to GetSortHandle (dotnet/coreclr#4882)

GlobalizationNatvie_GetSortHandle takes a UTF8 encoded string for the
locale name we want to construct a handle to, which is passed to ICU to
open some locale data.

We converted the UTF-16 encoded locale name to UTF8 in managed code, but
neglected to actually ensure the resulting value was null terminated.

Fixes dotnet/coreclr#4784

Commit migrated from https://github.com/dotnet/coreclr/commit/12b3b54bcc1bfa08c53a3e760ef39916a978ec93
src/coreclr/src/mscorlib/corefx/System/Globalization/CompareInfo.Unix.cs