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.w...@intel.com> Cc: Hao A Wu <hao.a...@intel.com> Cc: Ray Ni <ray...@intel.com> Cc: Star Zeng <star.z...@intel.com> Cc: Liming Gao <liming....@intel.com> Cc: Sean Brogan <sean.bro...@microsoft.com> Cc: Michael Turner <michael.tur...@microsoft.com> Cc: Bret Barkelew <bret.barke...@microsoft.com> Cc: Leif Lindholm <leif.lindh...@linaro.org> Signed-off-by: Zhichao gao <zhichao....@intel.com> --- MdeModulePkg/Universal/CapsulePei/UefiCapsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c index 3ac95b7be6..fabf30926c 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 -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42059): https://edk2.groups.io/g/devel/message/42059 Mute This Topic: https://groups.io/mt/32001196/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-