No, psz can't be NULL.

If you mean possible read beyond the end of the string: no, while(isspace ()) will stop at the terminating 0.

Reasons like this is why methods like these should use proper C++ techniques (use std::string, or at least begin/end iterators). But I prefer doing that separately, and not changing their interface now.