mirror of https://github.com/acidanthera/audk.git
SecurityPkg: Calculate the length of the String.
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
This commit is contained in:
parent
0bb5d7a55b
commit
cc976d20ff
|
@ -338,7 +338,7 @@ AddStr (
|
|||
StrLength = StrSize (Source2);
|
||||
} else {
|
||||
StrLength = StrSize (*Source1);
|
||||
StrLength += StrSize (Source2) -1;
|
||||
StrLength += StrSize (Source2) - 2;
|
||||
}
|
||||
|
||||
TmpStr = AllocateZeroPool (StrLength);
|
||||
|
|
Loading…
Reference in New Issue