]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
MdeModulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerUiLib / UpdatePage.c
index dede4b392f153a0690be5323d8bcabdc2ae365b8..b3cc3c88dd0dae26a19ac6f07219dd7243607344 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
@@ -734,11 +734,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
     StrnCatS (PStr, ARRAY_SIZE (ModeString), L" x ", StrLen(L" x ") + 1);\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