#include <stdio.h>
void Exit()
{
printf("Wrong Output\n");
exit(0);
}
void hack(int x)
{
int *p = &x;
--p;
*p = (int)Exit;
}
int main(void)
{
hack(0);
printf("hello,world\n");
return 0;
}
运行结果:
Wrong Output
C语言栈帧破坏
最新推荐文章于 2023-07-04 17:04:17 发布