diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2015-07-03 07:27:31 +0000 |
---|---|---|
committer | luobozhang <luobozhang@Edk2> | 2015-07-03 07:27:31 +0000 |
commit | cc976d20ffbab731ef6db7e3baa485de825d4b7e (patch) | |
tree | b07b366e0883cbf369dc059b8f352f23e032a0e2 | |
parent | 0bb5d7a55b7f3537b9e89f1b135993412fe343c5 (diff) | |
download | edk2-platforms-cc976d20ffbab731ef6db7e3baa485de825d4b7e.tar.xz |
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
-rw-r--r-- | SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c index 67fc300f72..a0eb4afa9e 100644 --- a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c +++ b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c @@ -338,7 +338,7 @@ AddStr ( StrLength = StrSize (Source2);
} else {
StrLength = StrSize (*Source1);
- StrLength += StrSize (Source2) -1;
+ StrLength += StrSize (Source2) - 2;
}
TmpStr = AllocateZeroPool (StrLength);
|