Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/378
Signed-off-by: Bill Wendling <isanbard@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Bill Wendling and committed by
Pablo Neira Ayuso
b8acd431 6be79156

+1 -1
+1 -1
net/netfilter/nf_conntrack_helper.c
··· 165 165 if (!nat) { 166 166 snprintf(mod_name, sizeof(mod_name), "%s", h->nat_mod_name); 167 167 rcu_read_unlock(); 168 - request_module(mod_name); 168 + request_module("%s", mod_name); 169 169 170 170 rcu_read_lock(); 171 171 nat = nf_conntrack_nat_helper_find(mod_name);