]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
MdeModulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / MdeModulePkg / Library / DxeCapsuleLibFmp / DxeCapsuleReportLib.c
index 3a9bb6e098df4f0d900edc7ee7b3e255dafd079f..fc0f8698a9b42b5878a188ad87346792a569dd57 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   DXE capsule report related function.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 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
@@ -377,7 +377,13 @@ InitCapsuleUpdateVariable (
   Index = 0;\r
   while (TRUE) {\r
     if (Index > 0) {\r
-      UnicodeValueToString (TempVarName, 0, Index, 0);\r
+      UnicodeValueToStringS (\r
+        TempVarName,\r
+        sizeof (CapsuleVarName) - ((UINTN)TempVarName - (UINTN)CapsuleVarName),\r
+        0,\r
+        Index,\r
+        0\r
+        );\r
     }\r
     Status = gRT->SetVariable (\r
                     CapsuleVarName,\r