summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-24 01:29:24 +0000
committermidipix <writeonce@midipix.org>2024-01-24 02:11:15 +0000
commit91299b6aa92cc9dcf2b93329d8f26a0e1e086e0d (patch)
treec81cadcd1317ad4e80d36480617c660d1fe145ae
parenta88bfbe7ee71556de2ff764d9527af37ab995d87 (diff)
downloadntapi-91299b6aa92cc9dcf2b93329d8f26a0e1e086e0d.tar.bz2
ntapi-91299b6aa92cc9dcf2b93329d8f26a0e1e086e0d.tar.xz
__ntapi_tt_spawn_native_process(): adjust argv limit, annotate alloc method.
-rw-r--r--src/process/ntapi_tt_spawn_native_process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process/ntapi_tt_spawn_native_process.c b/src/process/ntapi_tt_spawn_native_process.c
index 6472dd7..b69c2f1 100644
--- a/src/process/ntapi_tt_spawn_native_process.c
+++ b/src/process/ntapi_tt_spawn_native_process.c
@@ -18,7 +18,7 @@
(NT_PROCESS_SPAWN_FLAG_DEBUG_EXECUTION \
| NT_PROCESS_SPAWN_FLAG_DEBUG_SUSPENDED)
-#define __SPAWN_NATIVE_PROCESS_RUNTIME_BLOCK_ALLOC_SIZE (0x40000)
+#define __SPAWN_NATIVE_PROCESS_RUNTIME_BLOCK_ALLOC_SIZE (0x800000)
#define __SPAWN_NATIVE_PROCESS_RUNTIME_BLOCK_IMGBUF_SIZE (0x10000)
static int32_t __stdcall __tt_spawn_return(
@@ -354,6 +354,7 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
cparams.creation_flags_thread = NT_PROCESS_CREATE_FLAGS_CREATE_THREAD_SUSPENDED;
cparams.environment = wenv;
+ /* crtblock: alloc size: _needed_only_, round up to system granularity */
crtblock.size = (size_t)wch - (size_t)rdata;
crtblock.size += 0xFFFF;
crtblock.size |= 0xFFFF;