4 May
2008
4 May
'08
12:16
On Sunday 04 May 2008 11:46:12 Sam Clemens wrote:
Cristian Rodríguez wrote:
David C. Rankin escribió:
int main(int argc, char *argv[]) { char *endptr, *str, newstr[20];
strcpy(newstr,argv[1]);
^^ ./a.out 23000000000000000000000000000000000000
*** stack smashing detected ***: ./a.out terminated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I've never see that run-time error message. What compiler flags did you use to get THAT to be produced?
-fstack-protector -ffortify=2 is also quite useful. At the cost of a bit of performance, it checks most of your boundaries for you Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org