digitalmars.D - "Hello D": a stack-smashing demo
- zwang (12/12) May 07 2005 import std.stdio;
import std.stdio; void Hello(){ printf("Hello"); } void D(){ char[] D = " D!\n"; *(cast(int*)&D+5)-=5; printf(D); } void main(){ Hello, D; }
May 07 2005
import std.stdio; void Hello(){ printf("Hello"); } void D(){ char[] D = " D!\n"; *(cast(int*)&D+5)-=5; printf(D); } void main(){ Hello, D; }