Terminull Brigade allocates strlen() * 2 + 1 bytes for utf8 to utf16 conversion (one byte off for terminating WCHAR) with HEAP_ZERO_MEMORY (through calloc) and then only converts the characters without setting terminating 0 WCHAR. That is never an actual out of bounds read because the allocation size is aligned and with odd requested size the missing byte will always be de-facto allocated. But On Wine it will end up from time to time with not NULL terminated WCHAR string because we zero exactly the requested allocated size, while Windows (starting from Win8) zeroes aligned size.