Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Merge pull request #2475 from DeusData/fix/regex-compile-size-budget

Martin Vogelf40b1a564b6a
diff --cc src/cypher/cypher.c
index 1a4f03863,fde4798d1..e1fcf3467
--- a/src/cypher/cypher.c
+++ b/src/cypher/cypher.c
@@@ -5565,10 -5461,9 +5579,11 @@@ int cbm_cypher_execute(cbm_store_t *sto
g_cypher_depth_clamped = 0;
g_cypher_trail_truncated = 0;
g_cypher_truncated = false;
+ g_cypher_regex_refused = false;
cypher_deadline_arm(); /* #601: start the wall-clock budget for this query */
- if (max_rows <= 0) {
+ /* max_rows sizes the initial binding array: non-positive means the
+ * ceiling, and nothing above the ceiling is ever materialized anyway. */
+ if (max_rows <= 0 || max_rows > CYPHER_RESULT_CEILING) {
max_rows = CYPHER_RESULT_CEILING;
}