Skip to content

Commit e34b29d

Browse files
committed
fixed linux module injection on i686
1 parent 26167b4 commit e34b29d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/linux/module.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ LM_LoadModuleEx(const lm_process_t *process,
215215
ptlib.args[0] = path_addr;
216216
ptlib.args[1] = RTLD_LAZY;
217217
if (process->bits == 64) {
218-
*(int32_t *)&ptlib.stack[0] = (int32_t)RTLD_LAZY;
219-
*(uint64_t *)&ptlib.stack[4] = (uint64_t)path_addr;
218+
*(uint64_t *)&ptlib.stack[0] = (uint64_t)path_addr;
219+
*(int32_t *)&ptlib.stack[4] = (int32_t)RTLD_LAZY;
220220
} else {
221-
*(int32_t *)&ptlib.stack[0] = (int32_t)RTLD_LAZY;
222-
*(uint32_t *)&ptlib.stack[4] = (uint64_t)path_addr;
221+
*(uint32_t *)&ptlib.stack[0] = (uint64_t)path_addr;
222+
*(int32_t *)&ptlib.stack[4] = (int32_t)RTLD_LAZY;
223223
}
224224

225225
if (ptrace_attach(process->pid))

0 commit comments

Comments
 (0)