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.

test: size path_alias temp-dir buffer for cbm_mkdtemp (Windows)

Martin Vogel3bcbc5913691
diff --git a/tests/test_path_alias.c b/tests/test_path_alias.c
index 84d6ce819..820c487f7 100644
--- a/tests/test_path_alias.c
+++ b/tests/test_path_alias.c
@@ -229,7 +229,8 @@ static int write_file(const char *path, const char *content) {
}
TEST(path_alias_loader_monorepo) {
- char tmpl[] = "/tmp/cbm_palias_XXXXXX";
+ char tmpl[256];
+ snprintf(tmpl, sizeof(tmpl), "/tmp/cbm_palias_XXXXXX");
char *root = cbm_mkdtemp(tmpl);
ASSERT_NOT_NULL(root);
@@ -291,7 +292,8 @@ TEST(path_alias_loader_monorepo) {
/* ── Loader returns NULL when no configs found ─────────────────── */
TEST(path_alias_loader_no_configs) {
- char tmpl[] = "/tmp/cbm_palias_empty_XXXXXX";
+ char tmpl[256];
+ snprintf(tmpl, sizeof(tmpl), "/tmp/cbm_palias_empty_XXXXXX");
char *root = cbm_mkdtemp(tmpl);
ASSERT_NOT_NULL(root);