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:
Pawel Dziepak 2012-05-22 21:32:36 +02:00 committed by Rene Gollent
parent 4fd190af6e
commit 021ccbd18f

View File

@ -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,