summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-27 05:05:48 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-27 05:05:48 +0000
commit6f90dfbc0d23bae3cd2de9e16a752819751c0d2b (patch)
treef50257d7d07703900c199701283e953a40600de0 /MdeModulePkg/Universal
parentbd37f9718f9346bc4873390c6e84b37ed57190ad (diff)
downloadedk2-platforms-6f90dfbc0d23bae3cd2de9e16a752819751c0d2b.tar.xz
update the QueryVariableInfo interface to first determine if the pointer checked is pointing to a memory address inside Variable area.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7969 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index fdaad2017e..0e5735e941 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -1716,7 +1716,7 @@ RuntimeServiceQueryVariableInfo (
//
// Now walk through the related variable store.
//
- while (IsValidVariableHeader (Variable) && (Variable < GetEndPointer (VariableStoreHeader))) {
+ while ((Variable < GetEndPointer (VariableStoreHeader)) && IsValidVariableHeader (Variable)) {
NextVariable = GetNextVariablePtr (Variable);
VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;