Commit b8acd431 authored by Bill Wendling's avatar Bill Wendling Committed by Pablo Neira Ayuso

netfilter: conntrack: use correct format characters

When compiling with -Wformat, clang emits the following warnings:

net/netfilter/nf_conntrack_helper.c:168:18: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
                request_module(mod_name);
                               ^~~~~~~~

Use a string literal for the format string.

Link: https://github.com/ClangBuiltLinux/linux/issues/378Signed-off-by: default avatarBill Wendling <isanbard@gmail.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 6be79156
...@@ -165,7 +165,7 @@ nf_nat_helper_try_module_get(const char *name, u16 l3num, u8 protonum) ...@@ -165,7 +165,7 @@ nf_nat_helper_try_module_get(const char *name, u16 l3num, u8 protonum)
if (!nat) { if (!nat) {
snprintf(mod_name, sizeof(mod_name), "%s", h->nat_mod_name); snprintf(mod_name, sizeof(mod_name), "%s", h->nat_mod_name);
rcu_read_unlock(); rcu_read_unlock();
request_module(mod_name); request_module("%s", mod_name);
rcu_read_lock(); rcu_read_lock();
nat = nf_conntrack_nat_helper_find(mod_name); nat = nf_conntrack_nat_helper_find(mod_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment