HomeFreeBSD

kern: fail getgroup and setgroup with negative int

Description

kern: fail getgroup and setgroup with negative int

Found using
https://github.com/NetBSD/src/blob/trunk/tests/lib/libc/sys/t_getgroups.c

getgroups/setgroups want an int and therefore casting it to u_int
resulted in getgroups(-1, ...) not returning -1 / errno = EINVAL.

imp@ updated syscall.master and made changes markj@ suggested

PR: 189941
Tested by: imp@
Reviewed by: markj@
Pull Request: https://github.com/freebsd/freebsd-src/pull/407
Differential Revision: https://reviews.freebsd.org/D30617

Details

Provenance
gh_moritzbuhl.deAuthored on Jul 9 2019, 3:03 PM
impCommitted on Jun 2 2021, 7:22 PM
Differential Revision
D30617: kern: fail getgroup and setgroup with negative int
Parents
rG1976e079544c: Add bcm2710-rpi-cm3.dtb to the list of DTBs being added.
Branches
Unknown
Tags
Unknown