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

Function cv2_arguments

src/mcp/test_impact_coverage.c:1211–1228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211static cbm_coverage_parse_status_t cv2_arguments(const void *profiles, size_t profiles_len,
1212 const char *tests, size_t tests_len,
1213 const cbm_coverage_parse_limits_t *limits) {
1214 if (!profiles || (!tests && tests_len) || !limits)
1215 return CBM_COVERAGE_PARSE_INVALID;
1216 if (!limits->max_input_bytes || limits->max_input_bytes > UINT64_MAX / 8 ||
1217 !limits->max_items || !limits->max_alloc_bytes || limits->max_ids <= 0)
1218 return CBM_COVERAGE_PARSE_INVALID;
1219 if (profiles_len > (size_t)PTRDIFF_MAX || tests_len > (size_t)PTRDIFF_MAX)
1220 return CBM_COVERAGE_PARSE_LIMIT;
1221 uint64_t total = (uint64_t)profiles_len;
1222 if ((uint64_t)tests_len > UINT64_MAX - total)
1223 return CBM_COVERAGE_PARSE_LIMIT;
1224 total += (uint64_t)tests_len;
1225 if (total > limits->max_input_bytes)
1226 return CBM_COVERAGE_PARSE_LIMIT;
1227 return CBM_COVERAGE_PARSE_OK;
1228}
1229
1230cbm_coverage_parse_status_t cbm_coverage_map_parse_v2(const void *profiles, size_t profiles_len,
1231 const char *tests, size_t tests_len,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected