summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-27 05:43:09 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-27 05:43:09 +0000
commit3b4253677e9580656b4d1a035a8559d0d36d46e7 (patch)
treeb4aae62d43bb709a83821b415bd7829db166c7a3 /MdeModulePkg/Universal
parentf704fc850d6bc96d4fa21c626d676a5a361e6983 (diff)
downloadedk2-platforms-3b4253677e9580656b4d1a035a8559d0d36d46e7.tar.xz
Solve a wrong pointer reference in QueryVariableInfo().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11593 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c4
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index cd0023671e..d36254cc67 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -3,7 +3,7 @@
Emulation Variable services operate on the runtime volatile memory.
The nonvolatile variable space doesn't exist.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1565,7 +1565,7 @@ EmuQueryVariableInfo (
}
VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;
- if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
+ if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
HwErrVariableTotalSize += VariableSize;
} else {
CommonVariableTotalSize += VariableSize;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 3f571ecb86..173693d946 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2164,7 +2164,7 @@ VariableServiceQueryVariableInfo (
// since the space occupied by variables not marked with
// VAR_ADDED is not allowed to be reclaimed in Runtime.
//
- if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
+ if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
HwErrVariableTotalSize += VariableSize;
} else {
CommonVariableTotalSize += VariableSize;
@@ -2175,7 +2175,7 @@ VariableServiceQueryVariableInfo (
// the space not marked as VAR_ADDED is reclaimable now.
//
if (Variable->State == VAR_ADDED) {
- if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
+ if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
HwErrVariableTotalSize += VariableSize;
} else {
CommonVariableTotalSize += VariableSize;