Author: arty
Date: Mon Nov 12 01:28:39 2007
New Revision: 30369
URL:
http://svn.reactos.org/svn/reactos?rev=30369&view=rev
Log:
Handle recvfrom with no address buffer.
Modified:
trunk/reactos/drivers/network/afd/afd/lock.c
Modified: trunk/reactos/drivers/network/afd/afd/lock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/lock.c (original)
+++ trunk/reactos/drivers/network/afd/afd/lock.c Mon Nov 12 01:28:39 2007
@@ -46,12 +46,12 @@
BOOLEAN Write, BOOLEAN LockAddress ) {
UINT i;
/* Copy the buffer array so we don't lose it */
- UINT Lock = LockAddress ? 2 : 0;
+ UINT Lock = (LockAddress && AddressLen) ? 2 : 0;
UINT Size = sizeof(AFD_WSABUF) * (Count + Lock);
PAFD_WSABUF NewBuf = ExAllocatePool( PagedPool, Size * 2 );
PMDL NewMdl;
- AFD_DbgPrint(MID_TRACE,("Called\n"));
+ AFD_DbgPrint(MID_TRACE,("Called(%08x)\n", NewBuf));
if( NewBuf ) {
PAFD_MAPBUF MapBuf = (PAFD_MAPBUF)(NewBuf + Count + Lock);