mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[NTOS:MM] Add missing validation of Ordinal in MiLocateExportName (#4918)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user