]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Solve a wrong pointer reference in QueryVariableInfo().
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Apr 2011 05:43:09 +0000 (05:43 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Apr 2011 05:43:09 +0000 (05:43 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11593 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c

index cd0023671e9ce5d55ac31edd82a3c72ffcade99b..d36254cc675ca5a5d1f5155d621d21c3fb0fa8e3 100644 (file)
@@ -3,7 +3,7 @@
   Emulation Variable services operate on the runtime volatile memory.\r
   The nonvolatile variable space doesn't exist.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, 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
@@ -1565,7 +1565,7 @@ EmuQueryVariableInfo (
     }\r
     VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;\r
 \r
-    if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
+    if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
       HwErrVariableTotalSize += VariableSize;\r
     } else {\r
       CommonVariableTotalSize += VariableSize;\r
index 3f571ecb865020931c5018e5e690b41f68c37dc1..173693d9469248fd8f0a6fcb7f8a1dcb67f71416 100644 (file)
@@ -2164,7 +2164,7 @@ VariableServiceQueryVariableInfo (
       // since the space occupied by variables not marked with\r
       // VAR_ADDED is not allowed to be reclaimed in Runtime.\r
       //\r
-      if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
+      if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
         HwErrVariableTotalSize += VariableSize;\r
       } else {\r
         CommonVariableTotalSize += VariableSize;\r
@@ -2175,7 +2175,7 @@ VariableServiceQueryVariableInfo (
       // the space not marked as VAR_ADDED is reclaimable now.\r
       //\r
       if (Variable->State == VAR_ADDED) {\r
-        if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
+        if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
           HwErrVariableTotalSize += VariableSize;\r
         } else {\r
           CommonVariableTotalSize += VariableSize;\r