mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
std.os.linux: enforce null-terminated path arguments
This commit is contained in:
parent
f5e2fa5c95
commit
0b2e23b066
@ -1060,7 +1060,7 @@ pub fn rename(old: [*:0]const u8, new: [*:0]const u8) usize {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn renameat(oldfd: i32, oldpath: [*]const u8, newfd: i32, newpath: [*]const u8) usize {
|
||||
pub fn renameat(oldfd: i32, oldpath: [*:0]const u8, newfd: i32, newpath: [*:0]const u8) usize {
|
||||
if (@hasField(SYS, "renameat")) {
|
||||
return syscall4(
|
||||
.renameat,
|
||||
@ -1819,7 +1819,7 @@ pub fn fstatat(dirfd: i32, path: [*:0]const u8, stat_buf: *Stat, flags: u32) usi
|
||||
}
|
||||
}
|
||||
|
||||
pub fn statx(dirfd: i32, path: [*]const u8, flags: u32, mask: u32, statx_buf: *Statx) usize {
|
||||
pub fn statx(dirfd: i32, path: [*:0]const u8, flags: u32, mask: u32, statx_buf: *Statx) usize {
|
||||
if (@hasField(SYS, "statx")) {
|
||||
return syscall5(
|
||||
.statx,
|
||||
|
Loading…
Reference in New Issue
Block a user