Hi,
looking through the code, I'm wondering that there's some inconsistent
behavior/handling with regards to calling certain svn_utf-functions with
a nullptr.
svn_utf__cstring_is_valid() for instance does a nullptr check against
the provided data and returns FALSE in that case.
However, the callers of this function do not seem to handle that case then:
svn_fs__path_valid(): uses the path then to generate the error output
check_cstring_utf8(): uses it in the strlen()-call
svn_utf_cstring_utf8_width(): accesses the cstr before calling
svn_utf__cstring_is_valid() so that even if it would be determined to be
FALSE due to a nullptr, there would have already been an invalid access
before
I'm not too sure what the API promise is here, but IMO either the
nullptr-check in svn_utf__cstring_is_valid() is unnecessary or the
callers are missing the appropriate handling there.
Regards,
Stefan