From 833e69970351cc9b60ac5e36c98cc24ee25230c1 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 24 Jan 2024 00:13:56 +0000 Subject: __ntapi_tt_create_remote_process_params(): guard page size: use a macro. --- src/process/ntapi_tt_create_remote_process_params.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/process') diff --git a/src/process/ntapi_tt_create_remote_process_params.c b/src/process/ntapi_tt_create_remote_process_params.c index b365775..ac7e2d5 100644 --- a/src/process/ntapi_tt_create_remote_process_params.c +++ b/src/process/ntapi_tt_create_remote_process_params.c @@ -14,6 +14,8 @@ #include #include "ntapi_impl.h" +#define __PROCESS_PARAMS_GUARD_PAGE_SIZE (0x1000) + int32_t __stdcall __ntapi_tt_create_remote_process_params( __in void * hprocess, __out nt_process_parameters ** rprocess_params, @@ -175,7 +177,8 @@ int32_t __stdcall __ntapi_tt_create_remote_process_params( /* store offset and update alloc_size */ d_environment = process_params.alloc_size; - process_params.alloc_size += (uint32_t)env_block_size + 0x1000; + process_params.alloc_size += (uint32_t)env_block_size; + process_params.alloc_size += __PROCESS_PARAMS_GUARD_PAGE_SIZE; __ALIGN_ALLOC_SIZE; } -- cgit v1.2.3