inlined from ‘do_commandarp’ at xtables-arp.c:1198:16:
xtables-arp.c:844:2: warning: ‘strncpy’ specified bound 29 equals destination size [-Wstringop-truncation]
strncpy(target->t->u.user.name, jumpto, sizeof(target->t->u.user.name));
xtables-eb-translate.c: In function ‘do_commandeb_xlate’:
xtables-eb-translate.c:285:6: warning: unused variable ‘chcounter’ [-Wunused-variable]
int chcounter = 0; /* Needed for -C */
^~~~~~~~~
Signed-off-by: Florian Westphal <fw@strlen.de>
target->t = xtables_calloc(1, size);
target->t->u.target_size = size;
- strncpy(target->t->u.user.name, jumpto, sizeof(target->t->u.user.name));
+ strncpy(target->t->u.user.name, jumpto, sizeof(target->t->u.user.name) - 1);
target->t->u.user.name[sizeof(target->t->u.user.name)-1] = '\0';
target->t->u.user.revision = target->revision;
{
char *buffer;
int c, i;
- int chcounter = 0; /* Needed for -C */
int rule_nr = 0;
int rule_nr_end = 0;
int ret = 0;