diff --git a/reactos/dll/win32/ws2_32/misc/ns.c b/reactos/dll/win32/ws2_32/misc/ns.c index 6d765fd3580..5089a0abf6e 100644 --- a/reactos/dll/win32/ws2_32/misc/ns.c +++ b/reactos/dll/win32/ws2_32/misc/ns.c @@ -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,