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

Function yaml_bounded_strlen

src/cli/config_yaml_edit.c:266–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266static int yaml_bounded_strlen(const char *value, size_t max_len, size_t *out_len) {
267 if (!value || !out_len) {
268 return YAML_ERROR;
269 }
270 for (size_t i = 0; i <= max_len; i++) {
271 if (value[i] == '\0') {
272 *out_len = i;
273 return 0;
274 }
275 }
276 return YAML_ERROR;
277}
278
279static int yaml_validate_key(const char *key, size_t *out_len) {
280 size_t len = 0;

Calls

no outgoing calls

Tested by

no test coverage detected