[Mono.Unix] Fix crasher in StringToHeap (#5639)
authorMarius Ungureanu <teromario@yahoo.com>
Tue, 26 Sep 2017 20:34:07 +0000 (23:34 +0300)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 26 Sep 2017 20:34:07 +0000 (22:34 +0200)
commit98e4187cf080c2004c1c1c268e1b43faf1b4613f
tree2e742a304ef1672d0cac1ad212c5084c9cfa76b5
parentb586119cb961894e53e361ca91cb23f1ff2eb791
[Mono.Unix] Fix crasher in StringToHeap (#5639)

In case StringToHeap (string, Encoding) was called with a null string, it would unconditionally reference the string when trying to query the string's length.

Bug 10074 - Error while updating status of command: MonoDevelop.Ide.Commands.ViewCommands.LayoutList
mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs
mcs/class/Mono.Posix/Test/Mono.Unix/UnixMarshalTest.cs