diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-12 09:02:52 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-12 09:02:52 +0000 |
commit | bef3fd0c68eed51708dcce83443b83ac08b29eff (patch) | |
tree | 322fb0e9ee6908f416e4097b0fd11c7bdd33f88f /NetworkPkg | |
parent | 3c48e853eb6e6e85a4429b717620cfa9a5218867 (diff) | |
download | edk2-platforms-bef3fd0c68eed51708dcce83443b83ac08b29eff.tar.xz |
Add check before using it to avoid access violation.
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
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c | 1 |
1 files changed, 1 insertions, 0 deletions
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);
|