commdlg: Allocate memory using VirtualAlloc instead of NtAllocateVirtualMemory.
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> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
398b1391ba
commit
3c9104f961
|
@ -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++)
|
||||
|
|
Loading…
Reference in New Issue