Fix possible overflow with TTY ID

Co-authored-by: Kevin Morris <kevr@0cost.org>
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2024-07-27 15:20:42 +02:00
parent 9cd58123c4
commit e775827c8b
No known key found for this signature in database
GPG Key ID: 3E85EB44F610AD7F
1 changed files with 1 additions and 1 deletions

View File

@ -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