Files
bun.sh/test/regression/issue
Claude Bot eb65381769 fix: prevent PathBuffer overflow when path length equals MAX_PATH_BYTES
On Windows, MAX_PATH_BYTES is 98302 (32767 * 3 + 1). When a path string
is exactly this length, the code would attempt to:
1. Copy all 98302 bytes to buf[0..98302]
2. Write a null terminator at buf[98302] - which is out of bounds

This fix adds a bounds check before the memcpy to ensure we have room
for the null terminator. If the path is too long, we panic with a clear
error message instead of triggering an out-of-bounds panic.

The panic occurred in PathLike.sliceZWithForceCopy at types.zig:601.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 04:14:42 +00:00
..
2025-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2024-06-14 01:50:36 -07:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-07-20 23:02:10 -07:00