]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine code to make it more safely.
authorEric Dong <eric.dong@intel.com>
Wed, 25 Jun 2014 05:16:52 +0000 (05:16 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 25 Jun 2014 05:16:52 +0000 (05:16 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15588 6f19259b-4bc3-4df7-8a09-765794883524

OptionRomPkg/UndiRuntimeDxe/E100b.c

index 41308ba6fdafa361d799c5cdc892d164561d18de..8b29c7ebbdf9df6216e2ddd435cdc6f47da93ebe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides basic function upon network adapter card.\r
 \r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -1607,6 +1607,7 @@ CheckCBList (
       // check if Q is full\r
       //\r
       if (next (AdapterInfo->xmit_done_tail) != AdapterInfo->xmit_done_head) {\r
+        ASSERT (AdapterInfo->xmit_done_tail < TX_BUFFER_COUNT << 1);\r
         AdapterInfo->xmit_done[AdapterInfo->xmit_done_tail] = Tmp_ptr->free_data_ptr;\r
 \r
         UnMapIt (\r