May 07, 2005 "Hello D": a stack-smashing demo | ||||
---|---|---|---|---|
| ||||
import std.stdio; void Hello(){ printf("Hello"); } void D(){ char[] D = " D!\n"; *(cast(int*)&D+5)-=5; printf(D); } void main(){ Hello, D; } |
Copyright © 1999-2021 by the D Language Foundation
May 07, 2005 "Hello D": a stack-smashing demo | ||||
---|---|---|---|---|
| ||||
import std.stdio; void Hello(){ printf("Hello"); } void D(){ char[] D = " D!\n"; *(cast(int*)&D+5)-=5; printf(D); } void main(){ Hello, D; } |