mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
freebsd32: Report errors when copying out oldlenp in __sysctl
This matches the native implementation's behaviour. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43101
This commit is contained in:
parent
711880597c
commit
81eb7baa69
|
@ -2675,9 +2675,9 @@ freebsd32___sysctl(struct thread *td, struct freebsd32___sysctl_args *uap)
|
|||
uap->new, uap->newlen, &j, SCTL_MASK32);
|
||||
if (error)
|
||||
return (error);
|
||||
if (uap->oldlenp)
|
||||
suword32(uap->oldlenp, j);
|
||||
return (0);
|
||||
if (uap->oldlenp != NULL && suword32(uap->oldlenp, j) != 0)
|
||||
error = EFAULT;
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue