diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-19 01:49:34 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-19 01:49:34 +0000 |
commit | 9c4a5f742373f2a83154e6e39b6527636081151d (patch) | |
tree | 8446c932f77bf89efdbe13bd9c30e19a61b6e483 /MdeModulePkg | |
parent | a9dfdf4e68ba0986f817a23dc5c7d0fa282c01ca (diff) | |
download | edk2-9c4a5f742373f2a83154e6e39b6527636081151d.tar.gz edk2-9c4a5f742373f2a83154e6e39b6527636081151d.tar.bz2 edk2-9c4a5f742373f2a83154e6e39b6527636081151d.zip |
add security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10513 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index f36a5bd1bf..245da8637d 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -1,7 +1,7 @@ /** @file
Misc support routines for tcp.
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -171,7 +171,7 @@ TcpInitTcbPeer ( @param Local Pointer to the local (IP, Port).
@param Remote Pointer to the remote (IP, Port).
- @return Pointer to the TCP_CB with the least number of wildcard,
+ @return Pointer to the TCP_CB with the least number of wildcard,
if NULL no match is found.
**/
@@ -500,6 +500,9 @@ TcpSetState ( IN UINT8 State
)
{
+ ASSERT (Tcb->State < (sizeof (mTcpStateName) / sizeof (CHAR16 *)));
+ ASSERT (State < (sizeof (mTcpStateName) / sizeof (CHAR16 *)));
+
DEBUG (
(EFI_D_INFO,
"Tcb (%p) state %s --> %s\n",
|