From 07a6443a80d57c2aaa958bafba091bf4f9e88ca8 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 12 Sep 2023 13:05:00 +0100 Subject: fix(node/path): Prevent memory corruption in parse (#5083) * Add failing test for issue #4954 * fix(node/path): Return results with toValueGC --- test/js/node/path/path.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/js/node/path/path.test.js') diff --git a/test/js/node/path/path.test.js b/test/js/node/path/path.test.js index 5865d6182..f18e5c72d 100644 --- a/test/js/node/path/path.test.js +++ b/test/js/node/path/path.test.js @@ -812,6 +812,17 @@ describe("path.parse and path.format", () => { name: "another_dir", }, }, + { + // https://github.com/oven-sh/bun/issues/4954 + input: "/test/Ł.txt", + expected: { + root: "/", + dir: "/test", + base: "Ł.txt", + ext: ".txt", + name: "Ł", + }, + } ]; testCases.forEach(({ input, expected }) => { it(`case ${input}`, () => { -- cgit v1.2.3