patch-common_discover_c 610 B

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