1
0

patch-common_discover_c 610 B

12345678910111213
  1. --- dhcp-4.1.0.orig/common/discover.c 2008-08-29 19:48:57.000000000 +0200
  2. +++ dhcp-4.1.0/common/discover.c 2009-06-12 21:18:42.000000000 +0200
  3. @@ -684,8 +684,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));