mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00: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