Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/patches/397c4d5dec4b1d34 # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## GitHub aien-dev/CUDApp#256 (code only) closed derived `397c4d5dec4b1d34` #256 Imported from GitHub aien-dev/CUDApp#256 (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 `dba5821dbc68daefb0578a0bf669dd8113af8cb3` · Head `f9c1c8a5b25799ce27bfd8b1ab39b6f202932817` github-advanced-security[bot] commented on `tools/ampere_corpus.c` line 33 on 2026-11-01 18:12 UTC ## CodeQL / Uncontrolled data used in path expression This argument to a file access function is derived from user input (an environment variable) and then passed to open(__file). Show more details github-advanced-security[bot] reviewed (COMMENTED) on 2026-11-01 18:12 UTC cursor[bot] reviewed (APPROVED) on 2026-11-01 18:12 UTC Risk: low. Approved. Cursor Security Agent completed with no findings that need human review; Cursor Bugbot was not present on this PR.
Open in Web View Automation
Sent by Cursor Approval Agent: Pull Request Router and Approver ### Fetch it A git bundle of the pull request's head, 3885 bytes. ``` curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/397c4d5dec4b1d34.bundle -o 397c4d5dec4b1d34.bundle git fetch 397c4d5dec4b1d34.bundle refs/pull/256/head ``` Raw bundle · 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 256 f9c1c8a5b25799ce27bfd8b1ab39b6f202932817 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":256,"url":"https://github.com/aien-dev/CUDApp/pull/256","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:39:02Z","metadata":"unavailable","state_derived":true} ``` ### Changes ``` diff --git a/tools/ampere_corpus.c b/tools/ampere_corpus.c index 99208f9e..c71ad09c 100644 --- a/tools/ampere_corpus.c +++ b/tools/ampere_corpus.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include static int is_safe_corpus_dir(const char *dir) { @@ -28,8 +30,10 @@ static void save(const char *dir, unsigned serial, const char *suffix, const voi char path[4096]; int n = snprintf(path, sizeof(path), "%s/%ld-%u.%s", dir, (long)getpid(), serial, suffix); if (n < 0 || (size_t)n >= sizeof(path)) abort(); - FILE *f = fopen(path, "wb"); - if (!f) { perror(path); abort(); } + int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (fd < 0) { perror(path); abort(); } + FILE *f = fdopen(fd, "wb"); + if (!f) { perror(path); close(fd); abort(); } if (fwrite(data, 1, size, f) != size || fclose(f) != 0) abort(); } ```