nft-arp.c:112:3: note: 'sprintf' output between 2 and 21 bytes into a destination of size 20
sprintf(buf, "/%s", addr_to_dotted(mask));
Signed-off-by: Florian Westphal <fw@strlen.de>
mask_to_dotted(const struct in_addr *mask)
{
int i;
- static char buf[20];
+ static char buf[22];
u_int32_t maskaddr, bits;
maskaddr = ntohl(mask->s_addr);
sprintf(buf, "/%d", i);
else
/* mask was not a decent combination of 1's and 0's */
- sprintf(buf, "/%s", addr_to_dotted(mask));
+ snprintf(buf, sizeof(buf), "/%s", addr_to_dotted(mask));
return buf;
}