]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
MdeModulePkg/Network: Fix potential ASSERT if NetIp4IsUnicast is called
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4If.c
index 9cd5dd547ab2303b8a690a355ee3b4d03f0e7726..7512a00f4b3c8297ec7649cb125be490dffbc5c8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement IP4 pesudo interface.\r
   \r
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2017, 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
@@ -560,7 +560,6 @@ Ip4SetAddress (
 {\r
   EFI_ARP_CONFIG_DATA       ArpConfig;\r
   EFI_STATUS                Status;\r
-  INTN                      Len;\r
 \r
   NET_CHECK_SIGNATURE (Interface, IP4_INTERFACE_SIGNATURE);\r
 \r
@@ -575,9 +574,6 @@ Ip4SetAddress (
   Interface->Ip             = IpAddr;\r
   Interface->SubnetMask     = SubnetMask;\r
   Interface->SubnetBrdcast  = (IpAddr | ~SubnetMask);\r
-\r
-  Len                       = NetGetMaskLength (SubnetMask);\r
-  ASSERT (Len <= IP4_MASK_MAX);\r
   Interface->NetBrdcast     = (IpAddr | ~SubnetMask);\r
 \r
   //\r