mirror of https://github.com/acidanthera/audk.git
SecurityPkg AuthVariableLib: Correct address pointers data
Originally, the double pointer (VOID **) is not correct for convert address pointers, and also some address pointers were missing. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com> [lersek@redhat.com: fix up gcc build failure -- add more (VOID **) casts] Tested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18055 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e43525ee3c
commit
f18b2162e8
|
@ -101,7 +101,7 @@ VARIABLE_ENTRY_PROPERTY mAuthVarEntry[] = {
|
|||
},
|
||||
};
|
||||
|
||||
VOID *mAddressPointer[3];
|
||||
VOID **mAuthVarAddressPointer[10];
|
||||
|
||||
AUTH_VAR_LIB_CONTEXT_IN *mAuthVarLibContextIn = NULL;
|
||||
|
||||
|
@ -406,11 +406,18 @@ AuthVariableLibInitialize (
|
|||
AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);
|
||||
AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;
|
||||
AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]);
|
||||
mAddressPointer[0] = mHashCtx;
|
||||
mAddressPointer[1] = mPubKeyStore;
|
||||
mAddressPointer[2] = mCertDbStore;
|
||||
AuthVarLibContextOut->AddressPointer = mAddressPointer;
|
||||
AuthVarLibContextOut->AddressPointerCount = sizeof (mAddressPointer) / sizeof (mAddressPointer[0]);
|
||||
mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;
|
||||
mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;
|
||||
mAuthVarAddressPointer[2] = (VOID **) &mHashCtx;
|
||||
mAuthVarAddressPointer[3] = (VOID **) &mAuthVarLibContextIn;
|
||||
mAuthVarAddressPointer[4] = (VOID **) &(mAuthVarLibContextIn->FindVariable),
|
||||
mAuthVarAddressPointer[5] = (VOID **) &(mAuthVarLibContextIn->FindNextVariable),
|
||||
mAuthVarAddressPointer[6] = (VOID **) &(mAuthVarLibContextIn->UpdateVariable),
|
||||
mAuthVarAddressPointer[7] = (VOID **) &(mAuthVarLibContextIn->GetScratchBuffer),
|
||||
mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),
|
||||
mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),
|
||||
AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;
|
||||
AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue