diff options
author | Zhang, Chao B <chao.b.zhang@intel.com> | 2016-05-10 15:50:02 +0800 |
---|---|---|
committer | Zhang, Chao B <chao.b.zhang@intel.com> | 2016-05-11 08:58:14 +0800 |
commit | f1005559ec0ab65d42526313eb819f60c120eab8 (patch) | |
tree | c8c9e8f26378aff718a297af10c86b2a2c0b8188 /SecurityPkg/VariableAuthenticated | |
parent | 09abc636756b5d1f29224402181f7fd34f736c5f (diff) | |
download | edk2-f1005559ec0ab65d42526313eb819f60c120eab8.zip edk2-f1005559ec0ab65d42526313eb819f60c120eab8.tar.gz edk2-f1005559ec0ab65d42526313eb819f60c120eab8.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
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;
|