This doesn't look good:
c8 buf [SP_PATH_MAX] = sp_zero; sp_cstr_copy_to_n(path, len, buf, SP_PATH_MAX);
#define SP_PATH_MAX 4096
Can you show me a realistic case with a longer path?
Can you show me a realistic case with a longer path?