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

Function runtime_string_copy_bounded

src/daemon/runtime.c:2096–2106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2094}
2095
2096static char *runtime_string_copy_bounded(const char *value, size_t capacity) {
2097 size_t length = 0;
2098 if (!runtime_bounded_length(value, capacity, &length)) {
2099 return NULL;
2100 }
2101 char *copy = malloc(length + 1);
2102 if (copy) {
2103 memcpy(copy, value, length + 1);
2104 }
2105 return copy;
2106}
2107
2108static bool runtime_application_callbacks_valid(
2109 const cbm_daemon_runtime_application_callbacks_t *application) {

Calls 1

runtime_bounded_lengthFunction · 0.85

Tested by

no test coverage detected