From: Cameron Gutman Date: Thu, 8 Dec 2011 19:16:24 +0000 (+0000) Subject: [WS2_32] X-Git-Tag: backups/usb-bringup@55523~3^2~187 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=5eb7f4cb1053c1642f04694df35e6185ba8ab02b;ds=sidebyside [WS2_32] - Allocate enough memory for the WSAPROTOCOL_INFOW struct svn path=/trunk/; revision=54614 --- 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,