summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorinfo@mobile-stream.com2019-03-13 15:55:48 +0300
committersin2019-03-13 17:47:50 +0000
commit9e65ae387cb7dc955042a1c98c4e8448b01e172c (patch)
tree3789b2521b9db73bc76f2b6f7f80943e1e55eaf5 /tests
parent9b796691eb794e9f5279886e917c028a09f8a728 (diff)
getgroups: do not trap on non-positive gidsetsize
First, we should never check the size of __s if __l == 0 since the array is not going to be modified in that case. Second, negative __l is a well-defined error case (EINVAL) and we should never trap on a conforming code like this: r = getgroups(-1, NULL); if (r == -1) ... An example of non-desired behaviour for negative __l is the gnulib configure script which checks for getgroups(-1, ...) to catch some ancient FreeBSD kernel bug. The conftest binary traps even on good system (e.g. linux/musl) and the unnecessary getgroups wrapper is enforced for any project that uses gnulib. This patch also changes the size_t cast to avoid the explicit zero extension on systems where size_t differs from unsigned int.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions