]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
add security check.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiMisc.c
index 5275638d1336a28bb85641e222a84bd3bfe450ea..9eff1850bee6cab19d582cbed068fc7772b78548 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Miscellaneous routines for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 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
@@ -744,6 +744,9 @@ IScsiGetTcpConnDevicePath (
   // Duplicate it.\r
   //\r
   DevicePath  = DuplicateDevicePath (DevicePath);\r
+  if (DevicePath == NULL) {\r
+    return NULL;\r
+  }\r
 \r
   DPathNode   = (EFI_DEV_PATH *) DevicePath;\r
 \r