summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-08-24 11:22:05 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-08-31 10:40:07 +0800
commit158b558711f5fec395b88dd64fc0d134648620d6 (patch)
tree4217119bae23bd2fa8bef022c9efd29ed1dca680 /EmulatorPkg
parent209d095968c4c87418e547261f62966bce34b443 (diff)
downloadedk2-158b558711f5fec395b88dd64fc0d134648620d6.tar.gz
edk2-158b558711f5fec395b88dd64fc0d134648620d6.tar.bz2
edk2-158b558711f5fec395b88dd64fc0d134648620d6.zip
EmulatorPkg/EmuGopDxe: Fix TxtInEx.SetState SCT conformance failure
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1118 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
Diffstat (limited to 'EmulatorPkg')
-rw-r--r--EmulatorPkg/EmuGopDxe/GopInput.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c b/EmulatorPkg/EmuGopDxe/GopInput.c
index 1d40b1d7d6..97a5fbc1ad 100644
--- a/EmulatorPkg/EmuGopDxe/GopInput.c
+++ b/EmulatorPkg/EmuGopDxe/GopInput.c
@@ -1,6 +1,6 @@
/*++ @file
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 0 2011,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -442,11 +442,20 @@ EmuGopSimpleTextInExSetState (
EFI_STATUS Status;
EFI_TPL OldTpl;
+ if (KeyToggleState == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
if (Private->EmuGraphicsWindow == NULL) {
return EFI_NOT_READY;
}
+ if (((Private->KeyState.KeyToggleState & EFI_TOGGLE_STATE_VALID) != EFI_TOGGLE_STATE_VALID) ||
+ ((*KeyToggleState & EFI_TOGGLE_STATE_VALID) != EFI_TOGGLE_STATE_VALID)) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// Enter critical section
//