summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 07:12:25 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 07:12:25 +0000
commit12cbe232577107d0ef1196689914bd99cbcd12f9 (patch)
treee5550a84a77e0d71bf5ac96fb21393968f5c55db /SecurityPkg
parent932e0f6628b5dc2257333218c14746fd800b9c2d (diff)
downloadedk2-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')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c1
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;