Message ID | 20230822154336.12888-10-fw@strlen.de (mailing list archive) |
---|---|
State | Accepted |
Commit | aa222dd190d69ca8e0e2b990ec171c67a74d5383 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,01/10] netfilter: ebtables: fix fortify warnings in size_entry_mwt() | expand |
diff --git a/net/netfilter/xt_repldata.h b/net/netfilter/xt_repldata.h index 68ccbe50bb1e..5d1fb7018dba 100644 --- a/net/netfilter/xt_repldata.h +++ b/net/netfilter/xt_repldata.h @@ -29,7 +29,7 @@ if (tbl == NULL) \ return NULL; \ term = (struct type##_error *)&(((char *)tbl)[term_offset]); \ - strncpy(tbl->repl.name, info->name, sizeof(tbl->repl.name)); \ + strscpy_pad(tbl->repl.name, info->name, sizeof(tbl->repl.name)); \ *term = (struct type##_error)typ2##_ERROR_INIT; \ tbl->repl.valid_hooks = hook_mask; \ tbl->repl.num_entries = nhooks + 1; \