mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FREELDR] Initialize CandidatePageCount to zero, needed if the while-loop is not run.
Granted, if the while-loop is not run, this means there is no memory available at all on the computer where FreeLdr is running, which is quite unexpected. But do the initialization anyways, in order to avoid more obscure bugs down the line. On the other hand, PageLookupTableMemAddress doesn't need to be pre-initialized, since it gets initialized unconditionally afterwards.
This commit is contained in:
parent
61c4b5f615
commit
9a707af2e3
1 changed files with 2 additions and 2 deletions
|
@ -419,9 +419,9 @@ PVOID MmFindLocationForPageLookupTable(PFN_NUMBER TotalPageCount)
|
|||
SIZE_T PageLookupTableSize;
|
||||
PFN_NUMBER RequiredPages;
|
||||
PFN_NUMBER CandidateBasePage = 0;
|
||||
PFN_NUMBER CandidatePageCount;
|
||||
PFN_NUMBER CandidatePageCount = 0;
|
||||
PFN_NUMBER PageLookupTableEndPage;
|
||||
PVOID PageLookupTableMemAddress = NULL;
|
||||
PVOID PageLookupTableMemAddress;
|
||||
|
||||
// Calculate how much pages we need to keep the page lookup table
|
||||
PageLookupTableSize = TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM);
|
||||
|
|
Loading…
Reference in a new issue