rem: if (siz < sizeof(ifrp->ifr_addr))
add: if (siz < (int) sizeof(ifrp->ifr_addr))
context: void printif(struct ifreq *ifrm, int ifaliases){	char *inbuf = NULL;	struct ifconf ifc;	struct ifreq ifreq, *ifrp;	int i, siz, len = 8192;	int count = 0, noinet = 1;	char ifrbuf[8192];	getsock(af);	if (sock < 0)		err(1, "socket");	while (1) {		ifc.ifc_len = len;		ifc.ifc_buf = inbuf = realloc(inbuf, len);		if (inbuf == NULL)			err(1, "malloc");		if (ioctl(sock, SIOCGIFCONF, &ifc) < 0)			err(1, "SIOCGIFCONF");		if (ifc.ifc_len + sizeof(ifreq) < len)			break;		len *= 2;	}	ifrp = ifc.ifc_req;	ifreq.ifr_name[0] = '\0';	for (i = 0; i < ifc.ifc_len; ) {		ifrp = (struct ifreq *)((caddr_t)ifc.ifc_req + i);		memcpy(ifrbuf, ifrp, sizeof(*ifrp));		siz = ((struct ifreq *)ifrbuf)->ifr_addr.sa_len;		if (siz < sizeof(ifrp->ifr_addr))			siz = sizeof(ifrp->ifr_addr);		siz += sizeof(ifrp->ifr_name);		i += siz;		/* avoid alignment issue */		if (sizeof(ifrbuf) < siz)			err(1, "ifr too big");		memcpy(ifrbuf, ifrp, siz);		ifrp = (struct ifreq *)ifrbuf;		if (ifrm && strncmp(ifrm->ifr_name, ifrp->ifr_name,		    sizeof(ifrp->ifr_name)))			continue;		strncpy(name, ifrp->ifr_name, sizeof(ifrp->ifr_name));		if (ifrp->ifr_addr.sa_family == AF_LINK) {			ifreq = ifr = *ifrp;			if (getinfo(&ifreq) < 0)				continue;			status(1);			count++;			noinet = 1;			continue;		}	    		if (!strncmp(ifreq.ifr_name, ifrp->ifr_name,		    sizeof(ifrp->ifr_name))) {			const struct afswtch *p;			if (ifrp->ifr_addr.sa_family == AF_INET &&			    ifaliases == 0 && noinet == 0)				continue;			ifr = *ifrp;			if ((p = afp) != NULL) {				if (ifr.ifr_addr.sa_family == p->af_af)					(*p->af_status)(1);			} else {				for (p = afs; p->af_name; p++) {					if (ifr.ifr_addr.sa_family == p->af_af)						(*p->af_status)(0);				}			}			count++;			if (ifrp->ifr_addr.sa_family == AF_INET)				noinet = 0;			continue;		}	}	free(inbuf);	if (count == 0) {		fprintf(stderr, "%s: no such interface\n", name);		exit(1);	}}