diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-02-21 17:13:12 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-02-28 11:30:34 +0800 |
commit | 2a08577480290ae5fe70e1d7a04cd6db9845168c (patch) | |
tree | b180067943eb1732cdb69e48716cca1c18b0a297 /SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c | |
parent | 787f6744e751b011af3348a528d5f2c4919ff1d8 (diff) | |
download | edk2-2a08577480290ae5fe70e1d7a04cd6db9845168c.tar.gz edk2-2a08577480290ae5fe70e1d7a04cd6db9845168c.tar.bz2 edk2-2a08577480290ae5fe70e1d7a04cd6db9845168c.zip |
SecurityPkg/SecureBootConfigDxe: Use StrToGuid in BaseLib
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c')
-rw-r--r-- | SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index 6f587291e2..16ca9578ba 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -3248,6 +3248,7 @@ SecureBootCallback ( {
EFI_INPUT_KEY Key;
EFI_STATUS Status;
+ RETURN_STATUS RStatus;
SECUREBOOT_CONFIG_PRIVATE_DATA *Private;
UINTN BufferSize;
SECUREBOOT_CONFIGURATION *IfrNvData;
@@ -3630,12 +3631,9 @@ SecureBootCallback ( case KEY_SECURE_BOOT_SIGNATURE_GUID_DBX:
case KEY_SECURE_BOOT_SIGNATURE_GUID_DBT:
ASSERT (Private->SignatureGUID != NULL);
- Status = StringToGuid (
- IfrNvData->SignatureGuid,
- StrLen (IfrNvData->SignatureGuid),
- Private->SignatureGUID
- );
- if (EFI_ERROR (Status)) {
+ RStatus = StrToGuid (IfrNvData->SignatureGuid, Private->SignatureGUID);
+ if (RETURN_ERROR (RStatus) || (IfrNvData->SignatureGuid[GUID_STRING_LENGTH] != L'\0')) {
+ Status = EFI_INVALID_PARAMETER;
break;
}
|