Hyper-test:~ # cat a.c
#include
int main() {
char str[2];
strcpy(str,"asdpiaspd8a-s0d8a09sdas");
return 0;
}
Hyper-test:~ # gcc -fstack-protector-all -Wstack-protector a.c
Hyper-test:~ # ./a.out
*** stack smashing detected ***: ./a.out terminated
已放弃
Hyper-test:~ # gcc --version
gcc (GCC) 4.1.2 20070115 (prerelease) (SUSE Linux)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
阅读(4011) | 评论(0) | 转发(0) |