The change to signature might matter in some cases.  Does this function forward buf to any that assume an upper bound on strlen(buf) ?  (We have such functions, e.g. cutting a string up and assuming each fragment will fit in a CF_BUFSIZE buffer, because it's a fragment taken out of a buffer of that size.)  Does this function itself make such an assumption ?