rnd: add rust stack manipulation attempt
This commit is contained in:
parent
5ec6c7245e
commit
67731a9042
3 changed files with 116 additions and 23 deletions
|
@ -55,11 +55,21 @@ static void modifier(void) {
|
|||
*(&p + 2) = (uint64_t *)simple_printer;
|
||||
}
|
||||
|
||||
static void modifier_indexed(uint64_t *p) {
|
||||
// without frame-pointer
|
||||
(&p)[1] = (uint64_t *)simple_printer;
|
||||
|
||||
// with frame-pointer
|
||||
(&p)[2] = (uint64_t *)simple_printer;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
// caller();
|
||||
// many_args(0xfffffffffffffff0, 0xfffffffffffffff1, 0xfffffffffffffff3,
|
||||
// 0xfffffffffffffff4, 0xfffffffffffffff5, 0xfffffffffffffff6,
|
||||
// 0xfffffffffffffff7);
|
||||
// modifier_indexed(NULL);
|
||||
modifier();
|
||||
fprintf(stderr, "main exiting");
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue