samba-remove-legacy-index.patch 714 B

123456789101112131415161718192021
  1. diff -ur samba-3.0.25a/source/registry/reg_perfcount.c samba-3.0.25a-patched/source/registry/reg_perfcount.c
  2. --- samba-3.0.25a/source/registry/reg_perfcount.c 2007-02-28 22:55:05.000000000 -0600
  3. +++ samba-3.0.25a-patched/source/registry/reg_perfcount.c 2007-06-19 11:40:01.000000000 -0500
  4. @@ -615,14 +615,14 @@
  5. obj = NULL;
  6. memset(buf, 0, PERFCOUNT_MAX_LEN);
  7. memcpy(buf, data.dptr, data.dsize);
  8. - begin = index(buf, '[');
  9. - end = index(buf, ']');
  10. + begin = strchr(buf, '[');
  11. + end = strchr(buf, ']');
  12. if(begin == NULL || end == NULL)
  13. return False;
  14. start = begin+1;
  15. while(start < end) {
  16. - stop = index(start, ',');
  17. + stop = strchr(start, ',');
  18. if(stop == NULL)
  19. stop = end;
  20. *stop = '\0';