Skip to content

Commit 7119a97

Browse files
committed
make sure the stack is aligned before launching payloads
1 parent fe0b8bb commit 7119a97

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

elfldr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ elfldr_prepare_exec(pid_t pid, uint8_t *elf) {
367367
return -1;
368368
}
369369

370+
r.r_rsp &= ~0xfl;
370371
pt_setlong(pid, r.r_rsp-8, r.r_rip);
371372
r.r_rsp -= 8;
372373
r.r_rip = entry;

0 commit comments

Comments
 (0)