]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
MdeModulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / MdeModulePkg / Universal / CapsuleRuntimeDxe / CapsuleService.c
index ed8820a8f714195187d469a09c3b9378000741f0..216798d1617e07ecf0ca7d5cc2e150259da2ad95 100644 (file)
@@ -4,7 +4,7 @@
   It installs the Capsule Architectural Protocol defined in PI1.0a to signify \r
   the capsule runtime services are ready.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -205,7 +205,13 @@ UpdateCapsule (
   StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);\r
   TempVarName = CapsuleVarName + StrLen (CapsuleVarName);\r
   if (mTimes > 0) {\r
-    UnicodeValueToString (TempVarName, 0, mTimes, 0);\r
+    UnicodeValueToStringS (\r
+      TempVarName,\r
+      sizeof (CapsuleVarName) - ((UINTN)TempVarName - (UINTN)CapsuleVarName),\r
+      0,\r
+      mTimes,\r
+      0\r
+      );\r
   }\r
 \r
   //\r