mirror of
https://github.com/reactos/reactos.git
synced 2026-07-03 10:44:25 +08:00
[KERNEL32_VISTA] Don't delay-import from ntdll_vista
kernel32 functions can be called during process-attach. The same must be true for kernel32_vista. Wine's msvcrt calls GetUserDefaultLocaleName in kernel32_vista during process attach, which calls RtlLcidToLocaleName in ntdll_vista. If that function is delay-loaded (which is probably not allowed anyway during process-attach), the dll will not be initialized, the default user locale is 0 and RtlLcidToLocaleName fails.
Wine code doesn't check for failure and instead continues copying an uninitialized string buffer into the heap, causing heap corruption.
After removing the (redundant) add_delay_importlibs entry, this doesn't happen any longer.
This reverts commit 4f5478d. There is no effect on memory usage, because we load ntdll_vista anyway. See CORE-13361.
This commit is contained in:
@@ -42,6 +42,5 @@ add_library(kernel32_vista MODULE
|
||||
set_module_type(kernel32_vista win32dll ENTRYPOINT DllMain 12)
|
||||
target_link_libraries(kernel32_vista kernel32_vista_static kernel32_shared)
|
||||
add_importlibs(kernel32_vista kernel32 ntdll_vista ntdll)
|
||||
add_delay_importlibs(kernel32_vista ntdll_vista)
|
||||
add_dependencies(kernel32_vista psdk)
|
||||
add_cd_file(TARGET kernel32_vista DESTINATION reactos/system32 FOR all)
|
||||
|
||||
Reference in New Issue
Block a user