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

Function runtime_string_copy_bounded

src/daemon/runtime.c:2452–2462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2450}
2451
2452static char *runtime_string_copy_bounded(const char *value, size_t capacity) {
2453 size_t length = 0;
2454 if (!runtime_bounded_length(value, capacity, &length)) {
2455 return NULL;
2456 }
2457 char *copy = malloc(length + 1);
2458 if (copy) {
2459 memcpy(copy, value, length + 1);
2460 }
2461 return copy;
2462}
2463
2464static bool runtime_application_callbacks_valid(
2465 const cbm_daemon_runtime_application_callbacks_t *application) {

Calls 1

runtime_bounded_lengthFunction · 0.85

Tested by

no test coverage detected