]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
IntelFrameworkModulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / UpdatePage.c
index a2e38d2ee899222c8e7864e2ce060101671fcfa8..bdf26141d842de3887298b320d2421c8cfd0c3dc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Dynamically update the pages.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, 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
@@ -844,11 +844,17 @@ UpdateConModePage (
     //\r
     // Build mode string Column x Row\r
     //\r
-    UnicodeValueToString (ModeString, 0, Col, 0);\r
+    UnicodeValueToStringS (ModeString, sizeof (ModeString), 0, Col, 0);\r
     PStr = &ModeString[0];\r
     StrCatS (PStr, ARRAY_SIZE (ModeString), L" x ");\r
     PStr = PStr + StrLen (PStr);\r
-    UnicodeValueToString (PStr , 0, Row, 0);\r
+    UnicodeValueToStringS (\r
+      PStr,\r
+      sizeof (ModeString) - ((UINTN)PStr - (UINTN)&ModeString[0]),\r
+      0,\r
+      Row,\r
+      0\r
+      );\r
 \r
     ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);\r
 \r