From ad597daf84132db39ec527e254b12437f6ccb218 Mon Sep 17 00:00:00 2001 From: SpaghettiBorgar Date: Sat, 6 May 2023 10:12:44 +0200 Subject: [PATCH] expand buffer to silence warnings --- src/login.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/login.c b/src/login.c index ece1ee6..2682f44 100644 --- a/src/login.c +++ b/src/login.c @@ -501,8 +501,8 @@ void auth( { int ok; - char tty_id [3]; - snprintf(tty_id, 3, "%d", config.tty); + char tty_id [4]; + snprintf(tty_id, 4, "%d", config.tty); // Add XDG environment variables env_xdg_session(desktop->display_server[desktop->cur]); @@ -615,8 +615,8 @@ void auth( } // get a display - char vt[5]; - snprintf(vt, 5, "vt%d", config.tty); + char vt[6]; + snprintf(vt, 6, "vt%d", config.tty); // set env (this clears the environment) env_init(pwd); @@ -712,4 +712,3 @@ void auth( pam_diagnose(ok, buf); } } -