]> git.proxmox.com Git - mirror_edk2.git/commitdiff
update the QueryVariableInfo interface to first determine if the pointer checked...
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 Mar 2009 05:05:48 +0000 (05:05 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 Mar 2009 05:05:48 +0000 (05:05 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7969 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c

index fdaad2017ecb3d02c46ab585c62f8da979ab6cb6..0e5735e941a644d85cc6698592cea15a74c19726 100644 (file)
@@ -1716,7 +1716,7 @@ RuntimeServiceQueryVariableInfo (
   //\r
   // Now walk through the related variable store.\r
   //\r
-  while (IsValidVariableHeader (Variable) && (Variable < GetEndPointer (VariableStoreHeader))) {\r
+  while ((Variable < GetEndPointer (VariableStoreHeader)) && IsValidVariableHeader (Variable)) {\r
     NextVariable = GetNextVariablePtr (Variable);\r
     VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;\r
 \r