std.Io.Threaded: fix missing @memcpy in realPathPosix for FreeBSD

This commit is contained in:
Andrew Kelley
2025-12-26 14:11:30 -08:00
parent 0dbcf97551
commit 2e9415d8a0
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -4302,6 +4302,7 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File
}
const len = std.mem.findScalar(u8, &k_file.path, 0) orelse k_file.path.len;
if (len == 0) return error.NameTooLong;
@memcpy(out_buffer[0..len], k_file.path[0..len]);
return len;
},
else => return error.OperationUnsupported,
+1 -1
View File
@@ -250,7 +250,7 @@ pub const kinfo_file = extern struct {
/// Reserved for future cap_rights
_cap_spare: u64,
/// Path to file, if any.
path: [PATH_MAX - 1:0]u8,
path: [PATH_MAX]u8,
comptime {
assert(@sizeOf(@This()) == KINFO_FILE_SIZE);