summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorZhichao Gao <zhichao.gao@intel.com>2019-06-10 09:54:52 +0800
committerHao A Wu <hao.a.wu@intel.com>2019-06-24 09:18:32 +0800
commitbe5903ad1e244cbb0930161fb361ed0b699c4cb8 (patch)
tree3ead661fa0938a584df3b822a18690a8d922fd8d /MdeModulePkg/Universal
parentd96f83de5e7c25579a458b4dd17c131fa96a173b (diff)
downloadedk2-be5903ad1e244cbb0930161fb361ed0b699c4cb8.zip
edk2-be5903ad1e244cbb0930161fb361ed0b699c4cb8.tar.gz
edk2-be5903ad1e244cbb0930161fb361ed0b699c4cb8.tar.bz2
MdeMoudlePkg/CapsulePei: No need to remain space for null-terminate
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1853 UnicodeValueToStringS would remain two bytes for the first parameter to set the null- terminate. So remove this change in Mu. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Zhichao gao <zhichao.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/CapsulePei/UefiCapsule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
index 3ac95b7..8d4ae69 100644
--- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
+++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
@@ -922,7 +922,7 @@ GetScatterGatherHeadEntries (
if (Index != 0) {
UnicodeValueToStringS (
TempVarName,
- (sizeof (CapsuleVarName) - ((StrLen (CapsuleVarName) + 1) * sizeof (CHAR16))),
+ (sizeof (CapsuleVarName) - ((UINTN)TempVarName - (UINTN)CapsuleVarName)),
0,
Index,
0