提交 b9d80f83 编写于 作者: G Gao Feng 提交者: Pablo Neira Ayuso

netfilter: xt_helper: Use sizeof(variable) instead of literal number

It's better to use sizeof(info->name)-1 as index to force set the string
tail instead of literal number '29'.
Signed-off-by: NGao Feng <fgao@ikuai8.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 7bdc6624
......@@ -65,7 +65,7 @@ static int helper_mt_check(const struct xt_mtchk_param *par)
par->family);
return ret;
}
info->name[29] = '\0';
info->name[sizeof(info->name) - 1] = '\0';
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册