MdeModulePkg/Universal/Variable: 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: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17789 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1046,7 +1046,7 @@ InternalVarCheckVariablePropertySet (
|
||||
goto Done;
|
||||
}
|
||||
VariableName = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));
|
||||
StrnCpy (VariableName, Name, StrLen (Name));
|
||||
StrCpyS (VariableName, StrSize(Name)/sizeof(CHAR16), Name);
|
||||
CopyGuid (&Entry->Guid, Guid);
|
||||
CopyMem (&Entry->VariableProperty, VariableProperty, sizeof (*VariableProperty));
|
||||
InsertTailList (&mVarCheckVariableList, &Entry->Link);
|
||||
|
Reference in New Issue
Block a user