From b95a25d1ca5db400338d65792aa9da15c2c6f706 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Mon, 15 Jul 2013 07:47:02 +0000 Subject: [PATCH] Refine the validation for the input attribute before return. Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14467 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 1a88a746cb..d95b1237a1 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1,7 +1,7 @@ /** @file Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -295,6 +295,10 @@ TerminalConInSetState ( return EFI_INVALID_PARAMETER; } + if ((*KeyToggleState & EFI_TOGGLE_STATE_VALID) != EFI_TOGGLE_STATE_VALID) { + return EFI_UNSUPPORTED; + } + return EFI_SUCCESS; }