patch-source_registry_reg_perfcount_c 689 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- samba-3.3.4.orig/source/registry/reg_perfcount.c 2009-04-28 08:46:16.000000000 +0200
  3. +++ samba-3.3.4/source/registry/reg_perfcount.c 2009-05-10 23:52:42.000000000 +0200
  4. @@ -616,14 +616,14 @@ static bool _reg_perfcount_add_counter(P
  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';