- Allocate enough memory for the WSAPROTOCOL_INFOW struct

svn path=/trunk/; revision=54614
This commit is contained in:
Cameron Gutman 2011-12-08 19:16:24 +00:00
parent 5ef42e9838
commit 5eb7f4cb10

View file

@ -393,10 +393,11 @@ WSAStringToAddressA(IN LPSTR AddressString,
if (lpProtocolInfo)
{
len = WSAPROTOCOL_LEN+1;
len = WSAPROTOCOL_LEN+1;
lpProtoInfoW = HeapAlloc(GetProcessHeap(),
0,
len * sizeof(WCHAR) );
FIELD_OFFSET(WSAPROTOCOL_INFOW, szProtocol) +
(len * sizeof(WCHAR)));
memcpy(lpProtoInfoW,
lpProtocolInfo,