]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c
SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / SignedCapsulePkg / Universal / RecoveryModuleLoadPei / ParseConfigProfile.c
index fef1daf081994ba21a056c4470f55659236add7c..204fd533ea9ba662f3ce41ed799b93a238bbf623 100644 (file)
@@ -2,7 +2,7 @@
   Parse the INI configuration file and pass the information to the recovery driver\r
   so that the driver can perform recovery accordingly.\r
 \r
   Parse the INI configuration file and pass the information to the recovery driver\r
   so that the driver can perform recovery accordingly.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -85,7 +85,13 @@ ParseRecoveryDataFile (
     // Get the section name of each update\r
     //\r
     AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Recovery");\r
     // Get the section name of each update\r
     //\r
     AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Recovery");\r
-    AsciiValueToString(Entry + AsciiStrLen(Entry), 0, Index, 0);\r
+    AsciiValueToStringS (\r
+      Entry + AsciiStrnLenS (Entry, MAX_LINE_LENGTH),\r
+      MAX_LINE_LENGTH - AsciiStrnLenS (Entry, MAX_LINE_LENGTH),\r
+      0,\r
+      Index,\r
+      0\r
+      );\r
     Status = GetStringFromDataFile(\r
                Context,\r
                "Head",\r
     Status = GetStringFromDataFile(\r
                Context,\r
                "Head",\r