add: buf[sizeof(buf) - 1] = '\0';
context: parse_hostnetworkmask(const char *name, struct in6_addr **addrpp,		      struct in6_addr *maskp, unsigned int *naddrs){	struct in6_addr *addrp;	char buf[256];	char *p;	int i, j, n;	strncpy(buf, name, sizeof(buf) - 1);	if ((p = strrchr(buf, '/')) != NULL) {		*p = '\0';		addrp = parse_mask(p + 1);	} else		addrp = parse_mask(NULL);	in6addrcpy(maskp, addrp);	/* if a null mask is given, the name is ignored, like in "any/0" */	if (!memcmp(maskp, &in6addr_any, sizeof(in6addr_any)))		strcpy(buf, "::");	addrp = *addrpp = parse_hostnetwork(buf, naddrs);	n = *naddrs;	for (i = 0, j = 0; i < n; i++) {		int k;		for (k = 0; k < 4; k++)			addrp[j].in6_u.u6_addr32[k] &= maskp->in6_u.u6_addr32[k];		j++;		for (k = 0; k < j - 1; k++) {			if (IN6_ARE_ADDR_EQUAL(&addrp[k], &addrp[j - 1])) {				(*naddrs)--;				j--;				break;			}		}	}}