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
Emulation Variable services operate on the runtime volatile memory.\r
The nonvolatile variable space doesn't exist.\r
\r
Emulation Variable services operate on the runtime volatile memory.\r
The nonvolatile variable space doesn't exist.\r
\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);\r
gVariableInfo->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (gVariableInfo->Name != NULL);\r
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);\r
gVariableInfo->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (gVariableInfo->Name != NULL);\r
- StrnCpy (gVariableInfo->Name, VariableName, StrLen (VariableName));\r
+ StrCpyS (gVariableInfo->Name, StrSize(VariableName)/sizeof(CHAR16), VariableName);\r
gVariableInfo->Volatile = Volatile;\r
\r
gBS->InstallConfigurationTable (&gEfiVariableGuid, gVariableInfo);\r
gVariableInfo->Volatile = Volatile;\r
\r
gBS->InstallConfigurationTable (&gEfiVariableGuid, gVariableInfo);\r
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);\r
Entry->Next->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (Entry->Next->Name != NULL);\r
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);\r
Entry->Next->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (Entry->Next->Name != NULL);\r
- StrnCpy (Entry->Next->Name, VariableName, StrLen (VariableName));\r
+ StrCpyS (Entry->Next->Name, StrSize(VariableName)/sizeof(CHAR16), VariableName);\r
Entry->Next->Volatile = Volatile;\r
}\r
\r
Entry->Next->Volatile = Volatile;\r
}\r
\r
goto Done;\r
}\r
VariableName = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));\r
goto Done;\r
}\r
VariableName = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));\r
- StrnCpy (VariableName, Name, StrLen (Name));\r
+ StrCpyS (VariableName, StrSize(Name)/sizeof(CHAR16), Name);\r
CopyGuid (&Entry->Guid, Guid);\r
CopyMem (&Entry->VariableProperty, VariableProperty, sizeof (*VariableProperty));\r
InsertTailList (&mVarCheckVariableList, &Entry->Link);\r
CopyGuid (&Entry->Guid, Guid);\r
CopyMem (&Entry->VariableProperty, VariableProperty, sizeof (*VariableProperty));\r
InsertTailList (&mVarCheckVariableList, &Entry->Link);\r
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);\r
gVariableInfo->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (gVariableInfo->Name != NULL);\r
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);\r
gVariableInfo->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (gVariableInfo->Name != NULL);\r
- StrnCpy (gVariableInfo->Name, VariableName, StrLen (VariableName));\r
+ StrCpyS (gVariableInfo->Name, StrSize(VariableName)/sizeof(CHAR16), VariableName);\r
gVariableInfo->Volatile = Volatile;\r
}\r
\r
gVariableInfo->Volatile = Volatile;\r
}\r
\r
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);\r
Entry->Next->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (Entry->Next->Name != NULL);\r
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);\r
Entry->Next->Name = AllocateZeroPool (StrSize (VariableName));\r
ASSERT (Entry->Next->Name != NULL);\r
- StrnCpy (Entry->Next->Name, VariableName, StrLen (VariableName));\r
+ StrCpyS (Entry->Next->Name, StrSize(VariableName)/sizeof(CHAR16), VariableName);\r
Entry->Next->Volatile = Volatile;\r
}\r
\r
Entry->Next->Volatile = Volatile;\r
}\r
\r
}\r
\r
Name = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));\r
}\r
\r
Name = (CHAR16 *) ((UINTN) Entry + sizeof (*Entry));\r
- StrnCpy (Name, VariableName, StrLen (VariableName));\r
+ StrCpyS (Name, StrSize (VariableName)/sizeof(CHAR16), VariableName);\r
CopyGuid (&Entry->Guid, VendorGuid);\r
InsertTailList (&mLockedVariableList, &Entry->Link);\r
\r
CopyGuid (&Entry->Guid, VendorGuid);\r
InsertTailList (&mLockedVariableList, &Entry->Link);\r
\r