We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.6 【必须】不应当把用户可修改的字符串作为printf系列函数的“format”参数 如果用户可以控制字符串,则通过 %n %p 等内容,最坏情况下可以直接执行任意恶意代码。
在以下情况尤其需要注意: WIFI名,设备名……
错误:
snprintf(buf, sizeof(buf), wifi_name); 正确:
snprinf(buf, sizeof(buf), "%s", wifi_name); // 这里应该是 snprintf,少个 t
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
1.6 【必须】不应当把用户可修改的字符串作为printf系列函数的“format”参数
如果用户可以控制字符串,则通过 %n %p 等内容,最坏情况下可以直接执行任意恶意代码。
在以下情况尤其需要注意: WIFI名,设备名……
错误:
snprintf(buf, sizeof(buf), wifi_name);
正确:
snprinf(buf, sizeof(buf), "%s", wifi_name); // 这里应该是 snprintf,少个 t
The text was updated successfully, but these errors were encountered: