patch-source3_registry_reg_perfcount_c 641 B

1234567891011121314151617181920
  1. --- samba-3.4.3.orig/source3/registry/reg_perfcount.c 2009-10-29 08:47:16.000000000 +0100
  2. +++ samba-3.4.3/source3/registry/reg_perfcount.c 2009-11-20 21:11:54.000000000 +0100
  3. @@ -613,14 +613,14 @@ static bool _reg_perfcount_add_counter(P
  4. obj = NULL;
  5. memset(buf, 0, PERFCOUNT_MAX_LEN);
  6. memcpy(buf, data.dptr, data.dsize);
  7. - begin = index(buf, '[');
  8. - end = index(buf, ']');
  9. + begin = strchr(buf, '[');
  10. + end = strchr(buf, ']');
  11. if(begin == NULL || end == NULL)
  12. return False;
  13. start = begin+1;
  14. while(start < end) {
  15. - stop = index(start, ',');
  16. + stop = strchr(start, ',');
  17. if(stop == NULL)
  18. stop = end;
  19. *stop = '\0';