__getgroups_chk -- get list of supplementary group IDs, with buffer overflow checking


#include <unistd.h>

int __getgroups_chk(int size, gid_t * list, size_t listlen);


The interface __getgroups_chk() shall function in the same way as the interface getgroups(), except that __getgroups_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter listlen specifies the size in bytes of the object list.

The __getgroups_chk() function is not in the source standard; it is only in the binary standard.