diff options
author | Florian Westphal <fw@strlen.de> | 2018-06-06 14:21:57 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-06-06 14:22:25 +0200 |
commit | 56993546c80576986930f9bae7ae4ba744b1e508 (patch) | |
tree | 5e320c9035d73c702b47b95a7bb955326efea82a /extensions | |
parent | e6359eedfbf497e52d52451072aea4713ed80a88 (diff) |
extensions: fix build failure on fc28
make fails via:
extensions/ebt_string.c: In function ‘parse’:
extensions/ebt_string.c:171:3: error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
strncpy(info->algo, optarg, XT_STRING_MAX_ALGO_NAME_SIZE);
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/ebt_string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/ebt_string.c b/extensions/ebt_string.c index 9550c41..3deff1b 100644 --- a/extensions/ebt_string.c +++ b/extensions/ebt_string.c @@ -168,7 +168,7 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, ebt_check_option2(flags, OPT_STRING_ALGO); if (ebt_check_inverse2(optarg)) ebt_print_error2("Unexpected `!' after --string-algo"); - strncpy(info->algo, optarg, XT_STRING_MAX_ALGO_NAME_SIZE); + snprintf(info->algo, sizeof(info->algo), "%s", optarg); break; case STRING_ICASE: ebt_check_option2(flags, OPT_STRING_ICASE); |