diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-14 10:32:12 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-14 10:32:12 +0000 |
commit | 6f68699fbdfe7d154a78eb8c621286d23637d951 (patch) | |
tree | 6622b8a3a2923d75167b1e4a90d089054f5b8eee | |
parent | 23454ad0e2546b539150e96f2622f57ba1be13fb (diff) |
Notes
-rw-r--r-- | sys/kern/kern_prot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 53af7935e179..951c640b519a 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2084,6 +2084,8 @@ sys_getlogin(struct thread *td, struct getlogin_args *uap) bcopy(p->p_session->s_login, login, uap->namelen); SESS_UNLOCK(p->p_session); PROC_UNLOCK(p); + if (strlen(login) + 1 > uap->namelen) + return (ERANGE); error = copyout(login, uap->namebuf, uap->namelen); return(error); } |