From 5eb7f4cb1053c1642f04694df35e6185ba8ab02b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 8 Dec 2011 19:16:24 +0000 Subject: [PATCH] [WS2_32] - Allocate enough memory for the WSAPROTOCOL_INFOW struct svn path=/trunk/; revision=54614 --- reactos/dll/win32/ws2_32/misc/ns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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,