From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A98F482226 for ; Tue, 21 Feb 2017 03:36:07 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2017 03:36:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,189,1484035200"; d="scan'208";a="68323607" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by fmsmga006.fm.intel.com with ESMTP; 21 Feb 2017 03:36:06 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Jiewen Yao Date: Tue, 21 Feb 2017 19:35:31 +0800 Message-Id: <1487676934-12984-5-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1487676934-12984-1-git-send-email-hao.a.wu@intel.com> References: <1487676934-12984-1-git-send-email-hao.a.wu@intel.com> Subject: [PATCH 4/7] SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 11:36:07 -0000 It is the follow up of commits 51f0ceb..9e32e97 to replace AsciiValueToString/UnicodeValueToString with AsciiValueToStringS/UnicodeValueToStringS. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c | 10 ++++++++-- SignedCapsulePkg/Universal/SystemFirmwareUpdate/ParseConfigProfile.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c index fef1daf..204fd53 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 dcad762..67584c6 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", -- 1.9.5.msysgit.0