Re: [PATCH 1/2] ntdll: windows refuses to load an image, if sections overlap the header size as given in the SizeOfHeaders field (resend)
Bernhard Loos <bernhardloos(a)googlemail.com> writes:
--- dlls/kernel32/tests/loader.c | 79 ++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/virtual.c | 5 +++ 2 files changed, 84 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 4d420ea..bcef492 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -692,9 +692,88 @@ static void test_section_access(void) } }
+static void test_section_mapping(void) +{ + static const char filler[0x2000]; + static const char section_data[] = "section data 1234567890"; + DWORD total, written; + HANDLE hfile; + HMODULE hlib; + SYSTEM_INFO si; + char temp_path[MAX_PATH]; + char dll_name[MAX_PATH]; + BOOL ret; + + GetSystemInfo(&si); + + /* prevent displaying of the "Unable to load this DLL" message box */ + SetErrorMode(SEM_FAILCRITICALERRORS); + + GetTempPath(MAX_PATH, temp_path); + + GetTempFileName(temp_path, "ldr", 0, dll_name);
Please merge that test case into the existing loader tests instead of adding a new function to do the same thing. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard