interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

GitHub aien-dev/CUDApp#255 (code only)

closed derived 5d6d6891f375cb73 #255

Imported from GitHub aien-dev/CUDApp#255 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base c8ccbc34e4cb0b46693f2c6f8321c7c52eb88429 · Head c3562903726ad92636bf95f529eb01e8d0dfaf28

cursor[bot] reviewed (APPROVED) on 2026-11-01 18:12 UTC

Risk: medium. Approved: Cursor Security Agent passed with no findings that need human review, and Cursor Bugbot was not present. This is a narrow host-only path check on an env-gated corpus writer.

<div><a href="https://cursor.com/agents/bc-eddcbfd8-0397-414f-95f5-eef4f8d21391?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/automations/ca4a13aa-d616-11f1-a7e4-4605a90eab71"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-automation-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-automation-light.png"><img alt="View Automation" width="141" height="28" src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div>

<sub>Sent by Cursor Approval Agent: Pull Request Router and Approver</sub>

Apply it

git checkout -b patch-5d6d6891f375cb73 c8ccbc34e4cb0b46693f2c6f8321c7c52eb88429
curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/5d6d6891f375cb73.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/CUDApp
255
c3562903726ad92636bf95f529eb01e8d0dfaf28
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":255,"url":"https://github.com/aien-dev/CUDApp/pull/255","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:39:01Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/tools/ampere_corpus.c b/tools/ampere_corpus.c
index dce73811..99208f9e 100644
--- a/tools/ampere_corpus.c
+++ b/tools/ampere_corpus.c
@@ -9,6 +9,20 @@
 #include <string.h>
 #include <unistd.h>
 
+static int is_safe_corpus_dir(const char *dir)
+{
+    if (!dir || !*dir) return 0;
+    if (strchr(dir, '\\')) return 0;
+    for (const char *component = dir; *component;) {
+        while (*component == '/') ++component;
+        const char *start = component;
+        while (*component && *component != '/') ++component;
+        if ((size_t)(component - start) == 2 &&
+            start[0] == '.' && start[1] == '.') return 0;
+    }
+    return 1;
+}
+
 static void save(const char *dir, unsigned serial, const char *suffix, const void *data, size_t size)
 {
     char path[4096];
@@ -22,7 +36,7 @@ static void save(const char *dir, unsigned serial, const char *suffix, const voi
 void omega_ampere_corpus_capture(const BlackwellIRProgram *prog, const uint8_t *sm121, size_t len)
 {
     const char *dir = getenv("OMEGA_AMPERE_CORPUS_DIR");
-    if (!dir || !*dir) return;
+    if (!is_safe_corpus_dir(dir)) return;
     static unsigned serial;
     const unsigned id = serial++;
     uint8_t code[16384], reference[16384];