mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
netfilter: x_tables: replace strlcat() with snprintf()
In preparation for removing the deprecated strlcat() API[1], replace the strscpy()/strlcat() pairs in xt_proto_init() and xt_proto_fini() with snprintf(), which builds each /proc file name in a single call. Each name is "<prefix><suffix>", where <prefix> is the address-family string xt_prefix[af] and <suffix> is one of the FORMAT_TABLES, FORMAT_MATCHES or FORMAT_TARGETS literals. Prepend %s to the FORMAT macros and switch to snprintf(). Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
b010e2a4a9
commit
9cc4d9720d
1 changed files with 11 additions and 19 deletions
Loading…
Add table
Add a link
Reference in a new issue