When the two concatenated strings are both not null, the total length in bytes of them should calculate the character '\0' once.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: jiaxinwu <jiaxin.wu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17820
6f19259b-4bc3-4df7-8a09-
765794883524
StrLength = StrSize (Source2);\r
} else {\r
StrLength = StrSize (*Source1);\r
- StrLength += StrSize (Source2) -1;\r
+ StrLength += StrSize (Source2) - 2;\r
}\r
\r
TmpStr = AllocateZeroPool (StrLength);\r