]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Io.c
index 19ad101d5404d812998568727fdbb7175f43e72c..995bbcf840bfdd5201e7b798c543c57117853567 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI DHCP protocol implementation.\r
   \r
-Copyright (c) 2006 - 2012, 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
@@ -404,6 +404,7 @@ DhcpLeaseAcquired (
 \r
   if (DhcpSb->Netmask == 0) {\r
     Class           = NetGetIpClass (DhcpSb->ClientAddr);\r
+    ASSERT (Class < IP4_ADDR_CLASSE);\r
     DhcpSb->Netmask = gIp4AllMasks[Class << 3];\r
   }\r
 \r