mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-20 19:24:53 +00:00
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:
@@ -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 {
|
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});
|
const tty_str = try std.fmt.bufPrintZ(&tty_buffer, "{d}", .{config.tty});
|
||||||
|
|
||||||
// Set the XDG environment variables
|
// Set the XDG environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user