diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-25 07:12:25 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-25 07:12:25 +0000 |
commit | 12cbe232577107d0ef1196689914bd99cbcd12f9 (patch) | |
tree | e5550a84a77e0d71bf5ac96fb21393968f5c55db /SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c | |
parent | 932e0f6628b5dc2257333218c14746fd800b9c2d (diff) | |
download | edk2-platforms-12cbe232577107d0ef1196689914bd99cbcd12f9.tar.xz |
Check for NULL pointer before dereference it.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14086 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c')
-rw-r--r-- | SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c index 123ce6f8f0..aa468bac2c 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c @@ -808,6 +808,7 @@ Reclaim ( //
// Reinstall the new public key database.
//
+ ASSERT (PubKeyHeader != NULL);
CopyMem (CurrPtr, (UINT8*) PubKeyHeader, sizeof (VARIABLE_HEADER));
Variable = (VARIABLE_HEADER*) CurrPtr;
Variable->DataSize = NewPubKeySize;
|