Author: cgutman Date: Thu Dec 8 19:16:24 2011 New Revision: 54614
URL: http://svn.reactos.org/svn/reactos?rev=54614&view=rev Log: [WS2_32] - Allocate enough memory for the WSAPROTOCOL_INFOW struct
Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c
Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/ns.c?... ============================================================================== --- trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] Thu Dec 8 19:16:24 2011 @@ -393,10 +393,11 @@
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,