G
Gernot Frisch
char* s=" ";
int main()
{
strcpy(s, "Hello World");
}
This program crashes nicely. I think s is a pointer to a string that
is stored in the executable memory, so the strcpy will overwrite part
of the program, right?
I would not do this, but I found this error and I want to be able to
explain it to the one who wrote it.
Thank you,
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
int main()
{
strcpy(s, "Hello World");
}
This program crashes nicely. I think s is a pointer to a string that
is stored in the executable memory, so the strcpy will overwrite part
of the program, right?
I would not do this, but I found this error and I want to be able to
explain it to the one who wrote it.
Thank you,
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com