projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ef42e9
)
[WS2_32]
author
Cameron Gutman
<aicommander@gmail.com>
Thu, 8 Dec 2011 19:16:24 +0000
(19:16 +0000)
committer
Cameron Gutman
<aicommander@gmail.com>
Thu, 8 Dec 2011 19:16:24 +0000
(19:16 +0000)
- Allocate enough memory for the WSAPROTOCOL_INFOW struct
svn path=/trunk/; revision=54614
reactos/dll/win32/ws2_32/misc/ns.c
patch
|
blob
|
history
diff --git
a/reactos/dll/win32/ws2_32/misc/ns.c
b/reactos/dll/win32/ws2_32/misc/ns.c
index
6d765fd
..
5089a0a
100644
(file)
--- 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)
{
if (lpProtocolInfo)
{
- len =
WSAPROTOCOL_LEN+1;
+ len = WSAPROTOCOL_LEN+1;
lpProtoInfoW = HeapAlloc(GetProcessHeap(),
0,
lpProtoInfoW = HeapAlloc(GetProcessHeap(),
0,
- len * sizeof(WCHAR) );
+ FIELD_OFFSET(WSAPROTOCOL_INFOW, szProtocol) +
+ (len * sizeof(WCHAR)));
memcpy(lpProtoInfoW,
lpProtocolInfo,
memcpy(lpProtoInfoW,
lpProtocolInfo,