Consistently use size_t for buflen