Revision: 16130
          http://sourceforge.net/p/edk2/code/16130
Author:   ydong10
Date:     2014-09-18 09:02:57 +0000 (Thu, 18 Sep 2014)
Log Message:
-----------
Add more check for the code to make it more safely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Siyuan Fu <[email protected]>

Modified Paths:
--------------
    branches/UDK2014.SP1/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
    branches/UDK2014.SP1/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c

Modified: 
branches/UDK2014.SP1/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
===================================================================
--- branches/UDK2014.SP1/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c  
2014-09-18 08:45:26 UTC (rev 16129)
+++ branches/UDK2014.SP1/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c  
2014-09-18 09:02:57 UTC (rev 16130)
@@ -1,7 +1,7 @@
 /** @file
   UEFI Component Name(2) protocol implementation for MnpDxe driver.
 
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, 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
@@ -153,6 +153,7 @@
                   SnpModeData.CurrentAddress.Addr[Index]
                   );
     }
+    ASSERT (OffSet > 0);
     //
     // Remove the last '-'
     //

Modified: 
branches/UDK2014.SP1/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c
===================================================================
--- branches/UDK2014.SP1/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c  
2014-09-18 08:45:26 UTC (rev 16129)
+++ branches/UDK2014.SP1/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c  
2014-09-18 09:02:57 UTC (rev 16130)
@@ -1,7 +1,7 @@
 /** @file
     UEFI Component Name(2) protocol implementation for SnpDxe driver.
 
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2014, 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 
@@ -271,6 +271,7 @@
                 Snp->Mode->CurrentAddress.Addr[Index]
                 );
   }
+  ASSERT (OffSet > 0);
   //
   // Remove the last '-'
   //


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to