SecurityPkg: SecureBootConfigDxe: Add NULL pointer check

Add SecureBoot NULL pointer check before reference it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
This commit is contained in:
Zhang, Chao B 2016-05-10 15:50:02 +08:00
parent 09abc63675
commit f1005559ec
1 changed files with 1 additions and 1 deletions

View File

@ -2933,7 +2933,7 @@ SecureBootExtractConfigFromVariable (
//
// Fix Pk, SecureBootEnable inconsistence
//
if ((*SetupMode) == USER_MODE) {
if ((SetupMode != NULL) && (*SetupMode) == USER_MODE) {
ConfigData->HideSecureBoot = FALSE;
if ((SecureBootEnable != NULL) && (*SecureBootEnable == SECURE_BOOT_ENABLE)) {
ConfigData->AttemptSecureBoot = TRUE;