Check if the provided path is valid in the sense that it does cause a relative reference outside the directory. @note Currently, this function only check if there are any characters in FN_DIRSEP in the string, but it might change in the future. @code check_valid_path("../foo.so") -> true check_valid_path("foo.so") -> false @endcode */
| 368 | @endcode |
| 369 | */ |
| 370 | bool check_valid_path(const char *path, size_t len) |
| 371 | { |
| 372 | size_t prefix= my_strcspn(files_charset_info, path, path + len, FN_DIRSEP); |
| 373 | return prefix < len; |
| 374 | } |
| 375 | |
| 376 | static void fix_dl_name(MEM_ROOT *root, LEX_CSTRING *dl) |
| 377 | { |
no test coverage detected