Fix #8596: common_getgroups copies too little data
common_getgroups, when called from within the kernel, copies actualCount bytes instead of actualCount * sizeof(gid_t) bytes.
This commit is contained in:
parent
4fd190af6e
commit
021ccbd18f
@ -191,7 +191,7 @@ common_getgroups(int groupCount, gid_t* groupList, bool kernel)
|
||||
|
||||
// copy
|
||||
if (kernel) {
|
||||
memcpy(groupList, groups, actualCount);
|
||||
memcpy(groupList, groups, actualCount * sizeof(gid_t));
|
||||
} else {
|
||||
if (!IS_USER_ADDRESS(groupList)
|
||||
|| user_memcpy(groupList, groups,
|
||||
|
Loading…
Reference in New Issue
Block a user