diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-06-28 22:53:42 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-06-28 22:53:42 +0000 |
commit | fc390727730fdda50e6ae75e5251f0d76eb76ad7 (patch) | |
tree | c3b855e993d3b9dd29a9ca21ea31c76166574c04 /sys/posix4 | |
parent | e2b1a6d10b96c371b1ed99a006063141c005e921 (diff) | |
download | FreeBSD-src-fc390727730fdda50e6ae75e5251f0d76eb76ad7.zip FreeBSD-src-fc390727730fdda50e6ae75e5251f0d76eb76ad7.tar.gz |
Add error checking for copyin() operations in posix4 scheduling code.
Diffstat (limited to 'sys/posix4')
-rw-r--r-- | sys/posix4/p1003_1b.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c index cf2c7da..7ae378d 100644 --- a/sys/posix4/p1003_1b.c +++ b/sys/posix4/p1003_1b.c @@ -169,7 +169,9 @@ int sched_setparam(struct proc *p, int e; struct sched_param sched_param; - copyin(uap->param, &sched_param, sizeof(sched_param)); + e = copyin(uap->param, &sched_param, sizeof(sched_param)); + if (e) + return (e); (void) (0 || (e = p31b_proc(p, uap->pid, &p)) @@ -202,7 +204,9 @@ int sched_setscheduler(struct proc *p, int e; struct sched_param sched_param; - copyin(uap->param, &sched_param, sizeof(sched_param)); + e = copyin(uap->param, &sched_param, sizeof(sched_param)); + if (e) + return (e); (void) (0 || (e = p31b_proc(p, uap->pid, &p)) |