| 1507 | } |
| 1508 | |
| 1509 | static bool private_log_base_name_valid(const char *base_name) { |
| 1510 | if (!base_name || !base_name[0] || strcmp(base_name, ".") == 0 || |
| 1511 | strcmp(base_name, "..") == 0 || strchr(base_name, '/') || strchr(base_name, '\\')) { |
| 1512 | return false; |
| 1513 | } |
| 1514 | size_t length = strlen(base_name); |
| 1515 | return length <= NAME_MAX - 2; |
| 1516 | } |
| 1517 | |
| 1518 | static char *private_log_directory_path_copy(const char *directory_path) { |
| 1519 | #if defined(__APPLE__) || defined(__FreeBSD__) |
no outgoing calls
no test coverage detected