mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.Io.Threaded: fix missing @memcpy in realPathPosix for FreeBSD
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user