]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c
SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / SignedCapsulePkg / Universal / SystemFirmwareUpdate / ParseConfigProfile.c
index dcad76287cf576a35229d63c99baeab20c8fc8ac..67584c6478103def8708191a151f39119d053649 100644 (file)
@@ -2,7 +2,7 @@
   Parse the INI configuration file and pass the information to the update driver\r
   so that the driver can perform update accordingly.\r
 \r
   Parse the INI configuration file and pass the information to the update driver\r
   so that the driver can perform update 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
@@ -86,7 +86,13 @@ ParseUpdateDataFile (
     // Get the section name of each update\r
     //\r
     AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Update");\r
     // Get the section name of each update\r
     //\r
     AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Update");\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