summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-28 02:31:48 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-28 02:31:48 +0000
commit0c420e26a98fb084cf99bd4ff3baed1c66071ab0 (patch)
tree69638bcdd8d4c31a8778a192cf63efee3ac2c20a
parentec333268dc215756dc1dd93bb96c82f32810d31a (diff)
downloadedk2-0c420e26a98fb084cf99bd4ff3baed1c66071ab0.zip
edk2-0c420e26a98fb084cf99bd4ff3baed1c66071ab0.tar.gz
edk2-0c420e26a98fb084cf99bd4ff3baed1c66071ab0.tar.bz2
update
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8194 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index 1fb886a..faacd21 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -1111,7 +1111,13 @@ EmuSetVariable (
if ((DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize)) ||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize))) {
return EFI_INVALID_PARAMETER;
- }
+ }
+ //
+ // According to UEFI spec, HARDWARE_ERROR_RECORD variable name convention should be L"HwErrRecXXXX"
+ //
+ if (StrnCmp(VariableName, L"HwErrRec", StrLen(L"HwErrRec")) != 0) {
+ return EFI_INVALID_PARAMETER;
+ }
} else {
//
// The size of the VariableName, including the Unicode Null in bytes plus
@@ -1121,7 +1127,8 @@ EmuSetVariable (
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxVariableSize))) {
return EFI_INVALID_PARAMETER;
}
- }
+ }
+
//
// Check whether the input variable is already existed
//