summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/VariableAuthenticated
diff options
context:
space:
mode:
authorZhang, Chao B <chao.b.zhang@intel.com>2016-05-10 15:50:02 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2016-05-11 08:58:14 +0800
commitf1005559ec0ab65d42526313eb819f60c120eab8 (patch)
treec8c9e8f26378aff718a297af10c86b2a2c0b8188 /SecurityPkg/VariableAuthenticated
parent09abc636756b5d1f29224402181f7fd34f736c5f (diff)
downloadedk2-f1005559ec0ab65d42526313eb819f60c120eab8.tar.gz
edk2-f1005559ec0ab65d42526313eb819f60c120eab8.tar.bz2
edk2-f1005559ec0ab65d42526313eb819f60c120eab8.zip
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>
Diffstat (limited to 'SecurityPkg/VariableAuthenticated')
-rw-r--r--SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
index 088fa26e0d..3f80441602 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;