mirror of https://github.com/fairyglade/ly.git
Backport: 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:
parent
a807e8e11c
commit
10cd9615ef
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue