login.c: fix minor out of bound strncpy

Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
This commit is contained in:
Roosembert Palacios 2019-12-22 20:24:13 +01:00
parent aaa34e09da
commit 757ec52217
No known key found for this signature in database
GPG Key ID: CAAAECE5C2242BB7
1 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ void shell(struct passwd* pwd)
pos = pwd->pw_shell;
}
strncpy(args + 1, pos, 1024);
strncpy(args + 1, pos, 1023);
execl(pwd->pw_shell, args, NULL);
}
@ -671,4 +671,4 @@ void auth(
{
pam_diagnose(ok, buf);
}
}
}