]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c
Add more check for the code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / SnpDxe / ComponentName.c
index 0b12359f14b60c99329579edbcffb3a33bc542a6..d8b818401888d54186bdffc99f73ce3ab8dc7fe3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     UEFI Component Name(2) protocol implementation for SnpDxe driver.\r
 \r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed \r
 and made available under the terms and conditions of the BSD License which \r
 accompanies this distribution. The full text of the license may be found at \r
@@ -271,6 +271,7 @@ UpdateName (
                 Snp->Mode->CurrentAddress.Addr[Index]\r
                 );\r
   }\r
+  ASSERT (OffSet > 0);\r
   //\r
   // Remove the last '-'\r
   //\r