]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
add security check.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.c
index 362e084a7c8e9c6a6f98ceae3a19d36b745c4df5..84a39656f6a10e3e92dc4d37edc0e13dec4f8170 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2007, Intel Corporation.<BR>\r
+Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
 All rights reserved. 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
@@ -1314,6 +1314,10 @@ Ip4Groups (
   // host byte order\r
   //\r
   if (JoinFlag) {\r
+    //  \r
+    // When JoinFlag is TRUE, GroupAddress shouldn't be NULL.\r
+    //\r
+    ASSERT (GroupAddress != NULL);\r
     CopyMem (&Group, GroupAddress, sizeof (IP4_ADDR));\r
 \r
     for (Index = 0; Index < IpInstance->GroupCount; Index++) {\r