| 2175 | } |
| 2176 | |
| 2177 | static bool env_copy(char *out, size_t sz, const char *s, size_t n) { |
| 2178 | if (n == 0 || n >= sz) { |
| 2179 | return false; |
| 2180 | } |
| 2181 | memcpy(out, s, n); |
| 2182 | out[n] = '\0'; |
| 2183 | return true; |
| 2184 | } |
| 2185 | |
| 2186 | /* The host of a URL value (after any user@, before :port). */ |
| 2187 | static bool env_url_host(const char *v, char *host, size_t sz) { |
no outgoing calls
no test coverage detected