From: Alejandro Colomar Date: Mon, 13 May 2024 12:31:01 +0000 (+0200) Subject: src/login.c: Remove dead code X-Git-Tag: 4.17.0-rc1~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=847a19e7a31f0c45517381fb3cadbb6c2cdce148;p=thirdparty%2Fshadow.git src/login.c: Remove dead code The functions that set these strings --do_rlogin() and login_prompt()-- make sure to terminate them with a NUL. Fixes: 3704745289f5 ("* lib/defines.h: Define USER_NAME_MAX_LENGTH, based on utmp and [...]") Signed-off-by: Alejandro Colomar --- diff --git a/src/login.c b/src/login.c index cdfa13294..f9f8606fb 100644 --- a/src/login.c +++ b/src/login.c @@ -834,7 +834,6 @@ int main (int argc, char **argv) } preauth_flag = false; username = XMALLOC(max_size, char); - username[max_size - 1] = '\0'; login_prompt(username, max_size); if ('\0' == username[0]) {