具有挑战性的题目
int main()
{
int x;
x =1;
func(8,7,9);
x =2;
printf("%d",x);
return 0;
}
编写func函数,使得printf输出1
[解决办法]
越界,然后覆盖后面的代码
[解决办法]
void func(int, int, int){ __asm{ mov eax, esp;//save the current esp; add esp,0xd0;//seek the ip esp; pop ebx; add ebx,0x0a; push ebx; mov esp, eax; }}