From 63c76537c652eb5a84360ee043c5f7b63728a622 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Mon, 14 May 2018 15:28:40 +0800 Subject: [PATCH] SecurityPkg/OpalPassword: Fix PSID revert no hint message. For no warning message when do the PSID revert action, the message in the popup dialog is not enough. The error use of NULL for CreatePopUp function caused this regression. This change fixed it. Passed Unit Test: 1. Check PSID revert with/without warning message cases. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong Reviewed-by: Hao Wu --- .../Tcg/Opal/OpalPassword/OpalDriver.c | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index 8733564f00..5d1638d5cf 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -687,15 +687,26 @@ OpalDriverPopUpPsidInput ( InputLength = 0; while (TRUE) { Mask[InputLength] = L'_'; - CreatePopUp ( - EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, - &InputKey, - PopUpString, - PopUpString2, - L"---------------------", - Mask, - NULL - ); + if (PopUpString2 == NULL) { + CreatePopUp ( + EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, + &InputKey, + PopUpString, + L"---------------------", + Mask, + NULL + ); + } else { + CreatePopUp ( + EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, + &InputKey, + PopUpString, + PopUpString2, + L"---------------------", + Mask, + NULL + ); + } // // Check key. -- 2.39.2