Interesting, you all mighty wiki says its in the last sentence:
Quote:
this is known as a buffer overflow attack.


The posted code is in no case a buffer overflow and also not a stack overflow.
I told you that you can inject new code when you let the user write into the memory by eg. don't check your strings but just use strcpy. That is _NOT_ the case in the sample code.

Segfaults should also not occur when you try to execute something from the heap but only when you try to access unmapped memory.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com