]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine the validation for the input attribute before return.
authorEric Dong <eric.dong@intel.com>
Mon, 15 Jul 2013 07:47:02 +0000 (07:47 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 15 Jul 2013 07:47:02 +0000 (07:47 +0000)
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
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

index 1a88a746cbf5b9d8fce07a1e892c5d8c4f714b8a..d95b1237a1509e46d383a8b1fc2da931c5572fe7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -295,6 +295,10 @@ TerminalConInSetState (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if ((*KeyToggleState & EFI_TOGGLE_STATE_VALID) != EFI_TOGGLE_STATE_VALID) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r