MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / platform_copy_environment_value

Function platform_copy_environment_value

src/foundation/platform.c:360–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358#endif
359
360static 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
373static cbm_environment_resolver_t environment_resolver;
374

Callers 2

cbm_safe_getenvFunction · 0.85
cbm_native_getenvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected