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:
@@ -2933,7 +2933,7 @@ SecureBootExtractConfigFromVariable (
|
|||||||
//
|
//
|
||||||
// Fix Pk, SecureBootEnable inconsistence
|
// Fix Pk, SecureBootEnable inconsistence
|
||||||
//
|
//
|
||||||
if ((*SetupMode) == USER_MODE) {
|
if ((SetupMode != NULL) && (*SetupMode) == USER_MODE) {
|
||||||
ConfigData->HideSecureBoot = FALSE;
|
ConfigData->HideSecureBoot = FALSE;
|
||||||
if ((SecureBootEnable != NULL) && (*SecureBootEnable == SECURE_BOOT_ENABLE)) {
|
if ((SecureBootEnable != NULL) && (*SecureBootEnable == SECURE_BOOT_ENABLE)) {
|
||||||
ConfigData->AttemptSecureBoot = TRUE;
|
ConfigData->AttemptSecureBoot = TRUE;
|
||||||
|
Reference in New Issue
Block a user