]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c
add security check.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Output.c
index c9a1f6b106aa9cd495490a08e73192a420f8b168..956385a914d574930e1e76f68046b92a0b6a8406 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   TCP output process routines.\r
     \r
-Copyright (c) 2005 - 2006, Intel Corporation<BR>\r
+Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -445,7 +445,9 @@ TcpGetSegmentSndQue (
     }\r
   }\r
 \r
-  ASSERT (Cur != Head);\r
+  ASSERT (Cur  != Head);\r
+  ASSERT (Node != NULL);\r
+  ASSERT (Seg  != NULL);\r
 \r
   //\r
   // Return the buffer if it can be returned without\r
@@ -750,6 +752,7 @@ SEND_AGAIN:
   Len   = TcpDataToSend (Tcb, Force);\r
   Seq   = Tcb->SndNxt;\r
 \r
+  ASSERT ((Tcb->State) < (sizeof (mTcpOutFlag) / sizeof (mTcpOutFlag[0])));\r
   Flag  = mTcpOutFlag[Tcb->State];\r
 \r
   if ((Flag & TCP_FLG_SYN) != 0) {\r