[PATCH v3] ws2_32: Very minimal support for AF_UNIX.
Richard W.M. Jones
rjones at redhat.com
Tue Sep 8 12:26:13 CDT 2020
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.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
More information about the wine-devel
mailing list