summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/BootMaintenanceManagerUiLib
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-01-18 10:31:02 +0800
committerHao Wu <hao.a.wu@intel.com>2017-03-02 09:58:11 +0800
commit9f4048f7f8cd4b6bd5eee0f0c4bfd4eb6926a536 (patch)
tree0b3a079754cfcbf7c867e13d4eaefdc5545dcb23 /MdeModulePkg/Library/BootMaintenanceManagerUiLib
parent0438f5e287fa40c7aa143c3a151c5e5c743411b3 (diff)
downloadedk2-9f4048f7f8cd4b6bd5eee0f0c4bfd4eb6926a536.tar.gz
edk2-9f4048f7f8cd4b6bd5eee0f0c4bfd4eb6926a536.tar.bz2
edk2-9f4048f7f8cd4b6bd5eee0f0c4bfd4eb6926a536.zip
MdeModulePkg: Replace [Ascii|Unicode]ValueToString
It is the follow up of commits 51f0ceb..9e32e97 to replace AsciiValueToString/UnicodeValueToString with AsciiValueToStringS/UnicodeValueToStringS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/BootMaintenanceManagerUiLib')
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
index dede4b392f..b3cc3c88dd 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
@@ -1,7 +1,7 @@
/** @file
Dynamically update the pages.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
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
@@ -734,11 +734,17 @@ UpdateConModePage (
//
// Build mode string Column x Row
//
- UnicodeValueToString (ModeString, 0, Col, 0);
+ UnicodeValueToStringS (ModeString, sizeof (ModeString), 0, Col, 0);
PStr = &ModeString[0];
StrnCatS (PStr, ARRAY_SIZE (ModeString), L" x ", StrLen(L" x ") + 1);
PStr = PStr + StrLen (PStr);
- UnicodeValueToString (PStr , 0, Row, 0);
+ UnicodeValueToStringS (
+ PStr,
+ sizeof (ModeString) - ((UINTN)PStr - (UINTN)&ModeString[0]),
+ 0,
+ Row,
+ 0
+ );
ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);