Skip to content
Commit aa222dd1 authored by Justin Stitt's avatar Justin Stitt Committed by Florian Westphal
Browse files

netfilter: xtables: refactor deprecated strncpy



Prefer `strscpy_pad` as it's a more robust interface whilst maintaing
zero-padding behavior.

There may have existed a bug here due to both `tbl->repl.name` and
`info->name` having a size of 32 as defined below:
|  #define XT_TABLE_MAXNAMELEN 32

This may lead to buffer overreads in some situations -- `strscpy` solves
this by guaranteeing NUL-termination of the dest buffer.

Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent 06f7d3c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment