authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 21:55:29 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 21:55:29 -07:00
log7c161d74c77ef9d482bb71273163fd454674240b
treefad8cb5eccc2f6a216bc945c87c8b52edca3c267
parentaaea5467f1a8b4c2ce7129ee7bc6bf2e11544167
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

readlinkat: ensure result is nul-terminated


1 files changed, 1 insertions(+), 0 deletions(-)

mod.zig+1
......@@ -3466,6 +3466,7 @@ pub fn readlinkat(dirfd: c_int, noalias path: [*:0]const u8, noalias buf: []u8)
34663466 const rc = libc.readlinkat(dirfd, path, buf.ptr, buf.len);
34673467 if (rc == -1) return errno.fromInt(errno.fromLibC());
34683468 std.debug.assert(rc >= 0);
3469 buf[@intCast(rc)] = 0;
34693470 return buf[0..@intCast(rc) :0];
34703471}
34713472pub fn write(fd: c_int, buf: []const u8) !usize {