diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2015-07-01 08:22:31 +0000 |
---|---|---|
committer | shenshushi <shenshushi@Edk2> | 2015-07-01 08:22:31 +0000 |
commit | 59d1f4f0ab6a23724524ff9374cae368dc20af9a (patch) | |
tree | d1e24096b7ea50d4533bab4db371b69e4a1ef236 /MdeModulePkg | |
parent | b6344b37c98a78c2a9f3b8522eb2ccbda22bc573 (diff) | |
download | edk2-platforms-59d1f4f0ab6a23724524ff9374cae368dc20af9a.tar.xz |
MdeModulePkg/Universal/CapsulePei: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17783 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/CapsulePei/UefiCapsule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c index 6b934c9e3c..3184eb1a62 100644 --- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c +++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c @@ -583,7 +583,7 @@ GetCapsuleDescriptors ( (VOID **) &PPIVariableServices
);
if (Status == EFI_SUCCESS) {
- StrCpy (CapsuleVarName, EFI_CAPSULE_VARIABLE_NAME);
+ StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
Size = sizeof (CapsuleDataPtr64);
while (1) {
@@ -773,7 +773,7 @@ CapsuleCoalesce ( goto Done;
}
Size = sizeof (CapsuleDataPtr64);
- StrCpy (CapsuleVarName, EFI_CAPSULE_VARIABLE_NAME);
+ StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
while (TRUE) {
if (Index > 0) {
|