mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
b6344b37c9
commit
59d1f4f0ab
|
@ -583,7 +583,7 @@ GetCapsuleDescriptors (
|
||||||
(VOID **) &PPIVariableServices
|
(VOID **) &PPIVariableServices
|
||||||
);
|
);
|
||||||
if (Status == EFI_SUCCESS) {
|
if (Status == EFI_SUCCESS) {
|
||||||
StrCpy (CapsuleVarName, EFI_CAPSULE_VARIABLE_NAME);
|
StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
|
||||||
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
|
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
|
||||||
Size = sizeof (CapsuleDataPtr64);
|
Size = sizeof (CapsuleDataPtr64);
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -773,7 +773,7 @@ CapsuleCoalesce (
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
Size = sizeof (CapsuleDataPtr64);
|
Size = sizeof (CapsuleDataPtr64);
|
||||||
StrCpy (CapsuleVarName, EFI_CAPSULE_VARIABLE_NAME);
|
StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
|
||||||
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
|
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (Index > 0) {
|
if (Index > 0) {
|
||||||
|
|
Loading…
Reference in New Issue