mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
bd37f9718f
commit
6f90dfbc0d
|
@ -1716,7 +1716,7 @@ RuntimeServiceQueryVariableInfo (
|
||||||
//
|
//
|
||||||
// Now walk through the related variable store.
|
// Now walk through the related variable store.
|
||||||
//
|
//
|
||||||
while (IsValidVariableHeader (Variable) && (Variable < GetEndPointer (VariableStoreHeader))) {
|
while ((Variable < GetEndPointer (VariableStoreHeader)) && IsValidVariableHeader (Variable)) {
|
||||||
NextVariable = GetNextVariablePtr (Variable);
|
NextVariable = GetNextVariablePtr (Variable);
|
||||||
VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;
|
VariableSize = (UINT64) (UINTN) NextVariable - (UINT64) (UINTN) Variable;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue