Author: cgutman
Date: Mon Oct 27 15:04:29 2008
New Revision: 37029
URL:
http://svn.reactos.org/svn/reactos?rev=37029&view=rev
Log:
- Add another validity check
Modified:
branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c
Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Mon
Oct 27 15:04:29 2008
@@ -286,8 +286,9 @@
AddrFile->Port =
TCPAllocatePort(Address->Address[0].Address[0].sin_port);
- if (Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port)
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
{
ExFreePool(AddrFile);
return STATUS_INVALID_PARAMETER;
@@ -301,8 +302,9 @@
AddrFile->Port =
UDPAllocatePort(Address->Address[0].Address[0].sin_port);
- if (Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port)
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
{
ExFreePool(AddrFile);
return STATUS_INVALID_PARAMETER;