mirror of https://github.com/fairyglade/ly.git
login.c: fix minor out of bound strncpy
Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
This commit is contained in:
parent
aaa34e09da
commit
757ec52217
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue