mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
3c48e853eb
commit
bef3fd0c68
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue