]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
Add more check for the code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / ComponentName.c
index 25a7f88482ad38206a7e9fd8a83b6951a66bb3a8..b6f96087ede91dc2b3603d5e0b35774aebd8f5f1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for MnpDxe driver.\r
 \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 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\r
 of the BSD License which accompanies this distribution.  The full\r
@@ -153,6 +153,7 @@ UpdateName (
                   SnpModeData.CurrentAddress.Addr[Index]\r
                   );\r
     }\r
+    ASSERT (OffSet > 0);\r
     //\r
     // Remove the last '-'\r
     //\r