运算处理R-1-6-18强制
禁止使用 gets 函数
推荐使用 fgets 或者其他安全函数替代 gets 函数
使用 gets 函数
test.c
1#include <stdio.h>23void foo(void)4{5 char buffer[1024];6 gets(buffer);禁止使用 gets 函数 [gjb8114-r-1-6-18]7}
使用 fgets 函数
test.c
1#include <stdio.h>23void bar(void)4{5 char buffer[1024];6 fgets(buffer, sizeof(buffer), stdin);7}