]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecMain.c
Update the IPsec driver to check in invalid parameter of ProcessExt() according to...
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecMain.c
index f98f809ab8ba76f8baefe3da747d61965615c82d..a2fefa70d7127b009ec5f6e11fbb0ba642dd9eb9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The mian interface of IPsec Protocol.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,6 +70,13 @@ IpSecProcess (
   UINT8                  OldLastHead;\r
   BOOLEAN                IsOutbound;\r
 \r
+  if (OptionsBuffer == NULL || \r
+      OptionsLength == NULL || \r
+      FragmentTable == NULL || \r
+      FragmentCount == NULL\r
+      ) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   Private         = IPSEC_PRIVATE_DATA_FROM_IPSEC (This);\r
   IpPayload       = (*FragmentTable)[0].FragmentBuffer;\r
   IsOutbound      = (BOOLEAN) ((TrafficDirection == EfiIPsecOutBound) ? TRUE : FALSE);\r