diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-01 02:10:31 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-01 02:10:31 +0000 |
commit | a56b6e03e22c4023fdf5b026b0fcb096d6a0f677 (patch) | |
tree | 6ed98050857852c967ed393602f2e949bdf93cb2 /MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c | |
parent | 0d5df2aba72e7c8f2f172900fb7cfece27851a8f (diff) | |
download | edk2-platforms-a56b6e03e22c4023fdf5b026b0fcb096d6a0f677.tar.xz |
Add more check to make code more safely.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ouyang Qian <ouyang.qian@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13903 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index b3591aa7df..bf04b5a55b 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -592,6 +592,7 @@ TcpFormatNetbuf ( Seg = TCPSEG_NETBUF (Nbuf);
Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);
+ ASSERT (Head != NULL);
Nbuf->Tcp = Head;
Seg->Seq = NTOHL (Head->Seq);
|