bug(ENG-21501): Fix integer overflow in hosted_git_info.zig (#24561)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Marko Vejnovic
2025-11-10 16:30:47 -08:00
committed by GitHub
parent d87a928b94
commit 80a5b59fe5
2 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
import { describe, expect, test } from "bun:test";
import { bunEnv, bunExe, tempDir } from "harness";
describe("hosted-git-info boundary conditions", () => {
test.each([{ description: "git with pound", dependency: "https://github.com/#" }])(
"handle $description",
async ({ description: _, dependency }) => {
using dir = tempDir("hosted-git-info-empty", {
"package.json": JSON.stringify({
name: "test",
dependencies: {
dependency,
},
}),
});
await using proc = Bun.spawn({
cmd: [bunExe(), "install"],
cwd: String(dir),
env: bunEnv,
stderr: "pipe",
stdout: "pipe",
});
const [stderr] = await Promise.all([proc.stderr.text(), proc.exited]);
expect(stderr).not.toContain("panic");
},
);
});