mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:MM] Add missing validation of Ordinal in MiLocateExportName (#4918)
This commit is contained in:
parent
4e55236662
commit
d8695eee1e
1 changed files with 3 additions and 0 deletions
|
@ -304,6 +304,9 @@ MiLocateExportName(IN PVOID DllBase,
|
|||
/* Check if we couldn't find it */
|
||||
if (Ordinal == -1) return NULL;
|
||||
|
||||
/* Validate the ordinal */
|
||||
if (Ordinal >= ExportDirectory->NumberOfFunctions) return NULL;
|
||||
|
||||
/* Resolve the address and write it */
|
||||
ExportTable = (PULONG)((ULONG_PTR)DllBase +
|
||||
ExportDirectory->AddressOfFunctions);
|
||||
|
|
Loading…
Reference in a new issue