Author: cgutman
Date: Sat Aug 23 17:06:49 2008
New Revision: 35579
URL:
http://svn.reactos.org/svn/reactos?rev=35579&view=rev
Log:
- Make sure IPAddr is non-NULL
- Change STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/listen.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] Sat Aug 23
17:06:49 2008
@@ -61,6 +61,13 @@
IPAddr = (PTA_IP_ADDRESS)&ListenReceive->Address;
+ if( !IPAddr ) {
+ if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
+ Irp->IoStatus.Status = STATUS_NO_MEMORY;
+ Irp->IoStatus.Information = 0;
+ IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
+ }
+
AFD_DbgPrint(MID_TRACE,("IPAddr->TAAddressCount %d\n",
IPAddr->TAAddressCount));
AFD_DbgPrint(MID_TRACE,("IPAddr->Address[0].AddressType %d\n",
@@ -172,7 +179,7 @@
0, NULL );
if( FCB->State != SOCKET_STATE_BOUND ) {
- Status = STATUS_UNSUCCESSFUL;
+ Status = STATUS_INVALID_PARAMETER;
AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n"));
return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
}