Reviewed-by: Samer El-Haj-Mahmoud <[email protected]>
-----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Zhang, Chao B Sent: Tuesday, May 10, 2016 2:52 AM To: [email protected] Cc: [email protected]; Chao Zhang <[email protected]> Subject: [edk2] [Patch] 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 <[email protected]> --- .../VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index 088fa26..3f80441 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -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; -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

