[RTL] Introduce RtlpImageNtHeader,

which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857
This commit is contained in:
Mark Jansen 2020-03-28 14:28:49 +01:00
parent 4b2665046d
commit 177ae91bf6
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
7 changed files with 156 additions and 13 deletions

View file

@ -134,11 +134,10 @@ LdrVerifyMappedImageMatchesChecksum(
/*
* @implemented
* @note This needs SEH (See https://jira.reactos.org/browse/CORE-14857)
*/
NTSTATUS
NTAPI
RtlImageNtHeaderEx(
RtlpImageNtHeaderEx(
_In_ ULONG Flags,
_In_ PVOID Base,
_In_ ULONG64 Size,