Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1608907
  • 博文数量: 185
  • 博客积分: 10363
  • 博客等级: 上将
  • 技术积分: 2205
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-11 22:29
文章分类
文章存档

2013年(12)

2012年(5)

2011年(2)

2010年(12)

2009年(9)

2008年(15)

2007年(48)

2006年(82)

分类: C/C++

2008-11-10 16:36:46

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.
阅读(3919) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~