NtAllocateVirtualMemory was called for its zero_bits parameter, used as an alignment value. But it is not, so call VirtualAlloc instead.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/commdlg.dll16/filedlg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/commdlg.dll16/filedlg.c b/dlls/commdlg.dll16/filedlg.c index 5b72bfab100..050cddb0dd5 100644 --- a/dlls/commdlg.dll16/filedlg.c +++ b/dlls/commdlg.dll16/filedlg.c @@ -509,8 +509,7 @@ static LPOFNHOOKPROC alloc_hook( LPOFNHOOKPROC16 hook16 ) SIZE_T size = 0x1000; unsigned int i;
- if (!hooks && NtAllocateVirtualMemory( GetCurrentProcess(), (void **)&hooks, 12, &size, - MEM_COMMIT, PAGE_EXECUTE_READWRITE )) + if (!hooks && !(hooks = VirtualAlloc( NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE ))) return NULL;
for (i = 0; i < count; i++)