diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2015-07-01 08:34:22 +0000 |
---|---|---|
committer | shenshushi <shenshushi@Edk2> | 2015-07-01 08:34:22 +0000 |
commit | 568a5119a1b16cca8faa68fce9e15853eb5a322d (patch) | |
tree | caa96ffcca5da7bcb3dbefe7eff418cad50a30b3 /MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c | |
parent | 5e4b8bfe43530162ddcb498abb01e3326b6b7e97 (diff) | |
download | edk2-platforms-568a5119a1b16cca8faa68fce9e15853eb5a322d.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c index ab0c1d6324..61de47d357 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c @@ -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);
|