summaryrefslogtreecommitdiff
path: root/package/dhcp/patches/patch-common_discover_c
blob: 372ca8e1cb838d9de44befd11b053b3da553de28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- dhcp-4.3.5.orig/common/discover.c	2016-09-27 21:16:50.000000000 +0200
+++ dhcp-4.3.5/common/discover.c	2016-11-26 07:09:35.000000000 +0100
@@ -692,8 +692,8 @@ next_iface6(struct iface_info *info, int
 	for (i=0; i<16; i++) {
 		unsigned char byte;
                 static const char hex[] = "0123456789abcdef";
-                byte = ((index(hex, buf[i * 2]) - hex) << 4) |
-			(index(hex, buf[i * 2 + 1]) - hex);
+                byte = ((strchr(hex, buf[i * 2]) - hex) << 4) |
+			(strchr(hex, buf[i * 2 + 1]) - hex);
 		addr.sin6_addr.s6_addr[i] = byte;
 	}
 	memcpy(&info->addr, &addr, sizeof(addr));