]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString
authorHao Wu <hao.a.wu@intel.com>
Wed, 18 Jan 2017 05:04:14 +0000 (13:04 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 2 Mar 2017 01:58:50 +0000 (09:58 +0800)
It is the follow up of commits 51f0ceb..9e32e97 to replace
AsciiValueToString/UnicodeValueToString with
AsciiValueToStringS/UnicodeValueToStringS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c
SignedCapsulePkg/Universal/SystemFirmwareUpdate/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
-  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
@@ -85,7 +85,13 @@ ParseRecoveryDataFile (
     // 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
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
-  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
@@ -86,7 +86,13 @@ ParseUpdateDataFile (
     // 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