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
This commit is contained in:
sfu5 2013-01-25 07:12:25 +00:00
parent 932e0f6628
commit 12cbe23257
1 changed files with 1 additions and 0 deletions

View File

@ -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;