]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add check before using it to avoid access violation.
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Apr 2012 09:02:52 +0000 (09:02 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Apr 2012 09:02:52 +0000 (09:02 +0000)
Signed-off-by: Dong Eric <eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13192 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c

index 05df9fa9198ee1e839a4907d017930cec8630f8e..7e04573022a49d7957d3b58216874c2d58eab3f3 100644 (file)
@@ -814,6 +814,7 @@ CreateSadEntry (
   if (ValueStr != NULL) {\r
     (*Data)->AlgoInfo.EspAlgoInfo.AuthKeyLength = AuthKeyLength;\r
     AsciiStr = AllocateZeroPool (AuthKeyLength + 1);\r
+    ASSERT (AsciiStr != NULL);\r
     UnicodeStrToAsciiStr (ValueStr, AsciiStr);\r
     CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.AuthKey, AsciiStr, AuthKeyLength);\r
     FreePool (AsciiStr);\r