| 358 | #endif |
| 359 | |
| 360 | static const char *platform_copy_environment_value(char *buf, size_t buf_sz, const char *value) { |
| 361 | if (!buf || buf_sz == 0 || !value) { |
| 362 | return NULL; |
| 363 | } |
| 364 | size_t length = strlen(value); |
| 365 | if (length >= buf_sz) { |
| 366 | buf[0] = '\0'; |
| 367 | return NULL; |
| 368 | } |
| 369 | memcpy(buf, value, length + 1U); |
| 370 | return buf; |
| 371 | } |
| 372 | |
| 373 | static cbm_environment_resolver_t environment_resolver; |
| 374 |
no outgoing calls
no test coverage detected