Call `g_utf8_to_utf16` with a proper argument (#5470)
authorJoshua Peterson <petersonjm1@gmail.com>
Wed, 30 Aug 2017 09:59:57 +0000 (05:59 -0400)
committerZoltan Varga <vargaz@gmail.com>
Wed, 30 Aug 2017 09:59:57 +0000 (05:59 -0400)
commitee6f89642db8624e5fc40afbc3dd3e98c658274b
tree395780fb18a28208e876d66a00a5ecfb62222fcc
parent6649f23b27e947abd19aeb8b12d3a204313ca9ec
Call `g_utf8_to_utf16` with a proper argument (#5470)

* The sizes of `glong` and `gsize` differ on 64-bit Windows.
* In order to avoid uninitialized data in the high four bytes of the `bytes` argument to `mono_unicode_from_external`, call `g_utf8_to_utf16` with a `glong`, then copy the result.
mono/utils/strenc.c