Linux C++ stack smashing detected错误

陈拓 2021/09/12-2020/09/12

调试程序遇到一个错误:stack smashing detected

原因是数组开小了,出现了数组越界。

原数组定义:

    char destfile[64] = {0};

改成

    char destfile[256] = {0};

问题解决。

猜你喜欢

转载自blog.csdn.net/chentuo2000/article/details/120247439