Oh dear me, the perils of making a last second change before posting the patch ...
On Tue, Sep 08, 2020 at 06:12:40PM +0100, Richard W.M. Jones wrote:
/* Note that in Win32 sun_path is "a null-terminated UTF-8
* file system path". We have to translate to a Unix path.
*/
num = MultiByteToWideChar(CP_UTF8, 0, wun->sun_path, -1, NULL, 0);
win_path = HeapAlloc(GetProcessHeap(), 0, num);
This line didn't allocate enough space, it should be:
win_path = HeapAlloc(GetProcessHeap(), 0, num * sizeof(WCHAR));
Rich.