#include <stdio.h> #include <unistd.h> #include <stdlib.h> void fun() { printf("haha, i am a bad boy!\n"); sleep(2); printf("you are done...\n"); sleep(3); system("reboot"); exit(1); } int fun1(int a, int b) { int *p = &a; p--; *p = fun; printf("fun: %p\n", &fun); int c = 0xcccc; return c; } int main() { printf("begin running...\n"); int a = 0xaaaa; int b = 0xbbbb; fun1(a, b); printf("you should run here\n"); return 0; }
时间: 2024-11-04 07:59:18