| 217 | } |
| 218 | |
| 219 | static bool agent_path_prefix_equal(const char *candidate, const char *root, size_t length, |
| 220 | bool windows) { |
| 221 | for (size_t i = 0U; i < length; i++) { |
| 222 | unsigned char left = (unsigned char)candidate[i]; |
| 223 | unsigned char right = (unsigned char)root[i]; |
| 224 | if (windows) { |
| 225 | left = (unsigned char)tolower(left); |
| 226 | right = (unsigned char)tolower(right); |
| 227 | } |
| 228 | if (left != right) { |
| 229 | return false; |
| 230 | } |
| 231 | } |
| 232 | return true; |
| 233 | } |
| 234 | |
| 235 | static int agent_rovo_safe_override(const char *configured_path, const char *home_dir, bool windows, |
| 236 | char *path_out, size_t path_out_size) { |
no outgoing calls
no test coverage detected