Revision: 19751
http://sourceforge.net/p/edk2/code/19751
Author: czhang46
Date: 2016-01-27 02:46:51 +0000 (Wed, 27 Jan 2016)
Log Message:
-----------
SecurityPkg: SecureBootConfigDxe: Fix potential NULL pointer dereference
Fix SecureBoot potential NULL pointer dereference.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>
Modified Paths:
--------------
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
Modified:
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
===================================================================
---
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
2016-01-27 02:35:36 UTC (rev 19750)
+++
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
2016-01-27 02:46:51 UTC (rev 19751)
@@ -3075,16 +3075,17 @@
UpdateSecureBootString(
IN SECUREBOOT_CONFIG_PRIVATE_DATA *Private
) {
- EFI_STATUS Status;
UINT8 CurSecureBootMode;
UINT8 *SecureBoot;
+ SecureBoot = NULL;
+
//
// Get current secure boot state.
//
- Status = GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid,
(VOID**)&SecureBoot, NULL);
- if (EFI_ERROR(Status)) {
- return Status;
+ GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid,
(VOID**)&SecureBoot, NULL);
+ if (SecureBoot == NULL) {
+ return EFI_NOT_FOUND;
}
if (*SecureBoot == SECURE_BOOT_MODE_ENABLE) {
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits