summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2018-05-14 15:28:40 +0800
committerEric Dong <eric.dong@intel.com>2018-05-15 08:24:35 +0800
commit63c76537c652eb5a84360ee043c5f7b63728a622 (patch)
tree664245628221d413a0de51a5d5ce9447a639ae34 /SecurityPkg/Tcg
parent5a1d521dee69854c4eba6381800f44115bf4bb6c (diff)
downloadedk2-63c76537c652eb5a84360ee043c5f7b63728a622.tar.gz
edk2-63c76537c652eb5a84360ee043c5f7b63728a622.tar.bz2
edk2-63c76537c652eb5a84360ee043c5f7b63728a622.zip
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 <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c29
1 files 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.