Correct handling of zero address and zero address length in accept.
Modified: trunk/reactos/lib/msafd/misc/dllmain.c
_____
Modified: trunk/reactos/lib/msafd/misc/dllmain.c
--- trunk/reactos/lib/msafd/misc/dllmain.c 2005-01-13 06:46:22 UTC
(rev 13021)
+++ trunk/reactos/lib/msafd/misc/dllmain.c 2005-01-13 06:55:44 UTC
(rev 13022)
@@ -973,9 +973,14 @@
}
/* Return Address in SOCKADDR FORMAT */
- RtlCopyMemory (SocketAddress,
-
&ListenReceiveData->Address.Address[0].AddressType,
- sizeof(RemoteAddress));
+ if( SocketAddress ) {
+ RtlCopyMemory (SocketAddress,
+
&ListenReceiveData->Address.Address[0].AddressType,
+ sizeof(RemoteAddress));
+ if( *SocketAddressLength )
+ *SocketAddressLength =
+
ListenReceiveData->Address.Address[0].AddressLength;
+ }
NtClose( SockEvent );
Show replies by date