未验证 提交 6d7076cc 编写于 作者: engineer1109's avatar engineer1109 提交者: GitHub

fix -Werror=format-security (#53886)

上级 92121d17
......@@ -77,8 +77,10 @@ class CustomPluginCreater : public OpConverter {
// NOTE: to avoid string rewrite by iterator, deep copy here
std::vector<char> plugin_attr_name(attr_name.length() + 1, 0);
snprintf(
plugin_attr_name.data(), attr_name.length() + 1, attr_name.c_str());
snprintf(plugin_attr_name.data(),
attr_name.length() + 1,
"%s",
attr_name.c_str());
plugindata.name = plugin_attr_name.data();
if (op_desc.GetAttrType(attr_name) == framework::proto::AttrType::INT) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册