summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-24 00:13:56 +0000
committermidipix <writeonce@midipix.org>2024-01-24 02:11:14 +0000
commit833e69970351cc9b60ac5e36c98cc24ee25230c1 (patch)
tree854083c70f078fbdda88603ef4f50a70223742b3 /src/process
parent0a9ee420ee3113be02a71823516d7c2683789855 (diff)
downloadntapi-833e69970351cc9b60ac5e36c98cc24ee25230c1.tar.bz2
ntapi-833e69970351cc9b60ac5e36c98cc24ee25230c1.tar.xz
__ntapi_tt_create_remote_process_params(): guard page size: use a macro.
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_create_remote_process_params.c5
1 files changed, 4 insertions, 1 deletions
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 <ntapi/ntapi.h>
#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;
}