From: Hao Wu Date: Wed, 18 Jan 2017 05:04:14 +0000 (+0800) Subject: SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString X-Git-Tag: edk2-stable201903~4500 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=91db774bf4b33e1bf07f2f1aded5fd79c6f27c44;hp=de66e154ac642d1e30ac64a5daebea44208249fe;ds=sidebyside SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString 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 Reviewed-by: Jiewen Yao --- diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c index fef1daf081..204fd533ea 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c @@ -2,7 +2,7 @@ Parse the INI configuration file and pass the information to the recovery driver so that the driver can perform recovery accordingly. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -85,7 +85,13 @@ ParseRecoveryDataFile ( // Get the section name of each update // AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Recovery"); - AsciiValueToString(Entry + AsciiStrLen(Entry), 0, Index, 0); + AsciiValueToStringS ( + Entry + AsciiStrnLenS (Entry, MAX_LINE_LENGTH), + MAX_LINE_LENGTH - AsciiStrnLenS (Entry, MAX_LINE_LENGTH), + 0, + Index, + 0 + ); Status = GetStringFromDataFile( Context, "Head", diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c index dcad76287c..67584c6478 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c @@ -2,7 +2,7 @@ Parse the INI configuration file and pass the information to the update driver so that the driver can perform update accordingly. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -86,7 +86,13 @@ ParseUpdateDataFile ( // Get the section name of each update // AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Update"); - AsciiValueToString(Entry + AsciiStrLen(Entry), 0, Index, 0); + AsciiValueToStringS ( + Entry + AsciiStrnLenS (Entry, MAX_LINE_LENGTH), + MAX_LINE_LENGTH - AsciiStrnLenS (Entry, MAX_LINE_LENGTH), + 0, + Index, + 0 + ); Status = GetStringFromDataFile( Context, "Head",