View | Details | Raw Unified | Return to bug 144091
Collapse All | Expand All

(-)src/util/inet_addr_local.c-dist (+9 lines)
Lines 475-480 static int ial_procnet_ifinet6(INET_ADDR Link Here
475
#endif
475
#endif
476
	mask = addr;
476
	mask = addr;
477
	while (fgets(buf, sizeof(buf), fp) != 0) {
477
	while (fgets(buf, sizeof(buf), fp) != 0) {
478
	    /* strip colons to convert to the old format */
479
	    int i = 0, len = strlen(buf);
480
	    while (buf[i] && buf[i] != ' ') {
481
		if (buf[i] == ':') {
482
		    memmove(buf + i, buf + i + 1, len - i - 1);
483
		    len--;
484
		}
485
		i++;
486
	    }
478
	    /* 200501 hex_decode() is light-weight compared to getaddrinfo(). */
487
	    /* 200501 hex_decode() is light-weight compared to getaddrinfo(). */
479
	    if (hex_decode(addrbuf, buf, MAI_V6ADDR_BYTES * 2) == 0
488
	    if (hex_decode(addrbuf, buf, MAI_V6ADDR_BYTES * 2) == 0
480
		|| sscanf(buf + MAI_V6ADDR_BYTES * 2, " %*x %x", &plen) != 1
489
		|| sscanf(buf + MAI_V6ADDR_BYTES * 2, " %*x %x", &plen) != 1

Return to bug 144091