From bef3fd0c68eed51708dcce83443b83ac08b29eff Mon Sep 17 00:00:00 2001 From: ydong10 Date: Thu, 12 Apr 2012 09:02:52 +0000 Subject: [PATCH] Add check before using it to avoid access violation. Signed-off-by: Dong Eric git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13192 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c index 05df9fa919..7e04573022 100644 --- a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c +++ b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c @@ -814,6 +814,7 @@ CreateSadEntry ( if (ValueStr != NULL) { (*Data)->AlgoInfo.EspAlgoInfo.AuthKeyLength = AuthKeyLength; AsciiStr = AllocateZeroPool (AuthKeyLength + 1); + ASSERT (AsciiStr != NULL); UnicodeStrToAsciiStr (ValueStr, AsciiStr); CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.AuthKey, AsciiStr, AuthKeyLength); FreePool (AsciiStr); -- 2.39.2