Tag Info

New answers tagged


While the accepted answer is correct in suggesting moving everything to a different function it does not explain why. As you can see in this question and answer main() functions often perform a stack alignment to ensure that the stack is setup properly. The following instruction is performed: 83 e4 f0 and esp, 0xfffffff0 This will ...


Your example does segfault here (or cause the program termination if the stack protector is active). Maybe you should try to move the buffer overflow into another function. Perhaps your gcc version is converting return 0; from main into exit(0);.

Top 50 recent answers are included