]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
MdeModulePkg: Update UiApp to handle terminal type TtyTerm
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / BootMaint / UpdatePage.c
index 938912bfbea2dd12e0ac2f5854d95f01272ca996..9f1d20d8ed6a226f6bb2dc13e0106e38654ac520 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Dynamically update the pages.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2015, 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
@@ -838,7 +838,7 @@ UpdateConModePage (
     //\r
     UnicodeValueToString (ModeString, 0, Col, 0);\r
     PStr = &ModeString[0];\r
-    StrnCat (PStr, L" x ", StrLen(L" x ") + 1);\r
+    StrnCatS (PStr, sizeof (ModeString) / sizeof (ModeString[0]), L" x ", StrLen(L" x ") + 1);\r
     PStr = PStr + StrLen (PStr);\r
     UnicodeValueToString (PStr , 0, Row, 0);\r
 \r
@@ -1056,7 +1056,7 @@ UpdateTerminalPage (
   OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (OptionsOpCodeHandle != NULL);\r
 \r
-  for (Index = 0; Index < 4; Index++) {\r
+  for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]); Index++) {\r
     CheckFlags = 0;\r
     if (NewTerminalContext->TerminalType == Index) {\r
       CheckFlags |= EFI_IFR_OPTION_DEFAULT;\r