diff options
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index cbf953dfe9..dddc143751 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -263,7 +263,7 @@ UpdateVariableInfo ( ASSERT (gVariableInfo != NULL);
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);
- gVariableInfo->Name = AllocatePool (StrLen (VariableName));
+ gVariableInfo->Name = AllocatePool (StrSize (VariableName));
ASSERT (gVariableInfo->Name != NULL);
StrCpy (gVariableInfo->Name, VariableName);
gVariableInfo->Volatile = Volatile;
@@ -301,7 +301,7 @@ UpdateVariableInfo ( ASSERT (Entry->Next != NULL);
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);
- Entry->Next->Name = AllocatePool (StrLen (VariableName));
+ Entry->Next->Name = AllocatePool (StrSize (VariableName));
ASSERT (Entry->Next->Name != NULL);
StrCpy (Entry->Next->Name, VariableName);
Entry->Next->Volatile = Volatile;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 02f146895f..aadda4b587 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -176,7 +176,7 @@ UpdateVariableInfo ( ASSERT (gVariableInfo != NULL);
CopyGuid (&gVariableInfo->VendorGuid, VendorGuid);
- gVariableInfo->Name = AllocatePool (StrLen (VariableName));
+ gVariableInfo->Name = AllocatePool (StrSize (VariableName));
ASSERT (gVariableInfo->Name != NULL);
StrCpy (gVariableInfo->Name, VariableName);
gVariableInfo->Volatile = Volatile;
@@ -214,7 +214,7 @@ UpdateVariableInfo ( ASSERT (Entry->Next != NULL);
CopyGuid (&Entry->Next->VendorGuid, VendorGuid);
- Entry->Next->Name = AllocatePool (StrLen (VariableName));
+ Entry->Next->Name = AllocatePool (StrSize (VariableName));
ASSERT (Entry->Next->Name != NULL);
StrCpy (Entry->Next->Name, VariableName);
Entry->Next->Volatile = Volatile;
|