]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBm.c
IntelFrameworkModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / LegacyBootManagerLib / LegacyBm.c
index 1ed42d527a69a253afd9c6b92ed55dd157823bed..d3b48e8d0b9ec77f78ba50c8a6b4f78143603449 100644 (file)
@@ -3,7 +3,7 @@
   and manage the legacy boot option, all legacy boot option is getting from\r
   the legacy BBS table.\r
 \r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2016, 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
@@ -183,7 +183,7 @@ LegacyBmBuildLegacyDevNameString (
     //\r
     CopyMem (StringBufferA, StringDesc, LEGACY_BM_BOOT_DESCRIPTION_LENGTH);\r
     StringBufferA[LEGACY_BM_BOOT_DESCRIPTION_LENGTH] = 0;\r
-    AsciiStrToUnicodeStr (StringBufferA, StringBufferU);\r
+    AsciiStrToUnicodeStrS (StringBufferA, StringBufferU, sizeof (StringBufferU) / sizeof (StringBufferU[0]));\r
     Fmt   = L"%s";\r
     Type  = StringBufferU;\r
   }\r
@@ -537,7 +537,7 @@ LegacyBmCreateLegacyBootOption (
   //\r
   // Create the BBS device path with description string\r
   //\r
-  UnicodeStrToAsciiStr (Description, HelpString);\r
+  UnicodeStrToAsciiStrS (Description, HelpString, sizeof (HelpString));\r
   StringLen = AsciiStrLen (HelpString);\r
   DevicePath = AllocatePool (sizeof (BBS_BBS_DEVICE_PATH) + StringLen + END_DEVICE_PATH_LENGTH);\r
   ASSERT (DevicePath != NULL);\r