From e775827c8b18d5300c3300486facbfe2e6377436 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sat, 27 Jul 2024 15:20:42 +0200 Subject: [PATCH] Fix possible overflow with TTY ID Co-authored-by: Kevin Morris Signed-off-by: AnErrupTion --- src/auth.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.zig b/src/auth.zig index dbbdfda..2da71ab 100644 --- a/src/auth.zig +++ b/src/auth.zig @@ -21,7 +21,7 @@ pub fn sessionSignalHandler(i: c_int) callconv(.C) void { } pub fn authenticate(config: Config, current_environment: Desktop.Environment, login: [:0]const u8, password: [:0]const u8) !void { - var tty_buffer: [2]u8 = undefined; + var tty_buffer: [3]u8 = undefined; const tty_str = try std.fmt.bufPrintZ(&tty_buffer, "{d}", .{config.tty}); // Set the XDG environment variables