]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
Update code to avoid potential access violation.
[mirror_edk2.git] / NetworkPkg / Application / IpsecConfig / PolicyEntryOperation.c
index 67209f6247f660df39d952266d251d95413ca06c..05df9fa9198ee1e839a4907d017930cec8630f8e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of policy entry operation function in IpSecConfig application.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, 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
@@ -784,6 +784,7 @@ CreateSadEntry (
   if (ValueStr != NULL ) {\r
     (*Data)->AlgoInfo.EspAlgoInfo.EncKeyLength = EncKeyLength;\r
     AsciiStr = AllocateZeroPool (EncKeyLength + 1);\r
+    ASSERT (AsciiStr != NULL);\r
     UnicodeStrToAsciiStr (ValueStr, AsciiStr);\r
     CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.EncKey,  AsciiStr, EncKeyLength);\r
     FreePool (AsciiStr);\r