错误的处理"/>
tack smashing detected 错误的处理
分配空间不足引起的错误:‘Stack smashing detected’
在程序编译的时候,加上一个选项即可:"-fno-stack-protector"
举个简单的例子,比如,原来编译时使用的命令为:
gcc -o xxxx source.c
则需要改为:
gcc -o xxxx "-fno-stack-protector" source.c
如果是通过makefile文件进行编译,除了那个生成最终二进制文件的编译命令之外,记得将其中每个“.o”文件的编译命令中也加上"-fno-stack-protector",最好直接将这个选项加到环境变量中。
是在该函数的结束时return 报错,在该函数的开头声明uint8_t data[32] 改为data[60];因为函数用到了申请data[60]
更多推荐
tack smashing detected 错误的处理
发布评论