mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
libwbclient: Fix a division by zero
If wbinfo -r returns no groups, wbcAllocateMemory divides by zero
This commit is contained in:
parent
3b71f5df03
commit
a642cb5a92
@ -605,7 +605,7 @@ wbcErr wbcGetGroups(const char *account,
|
||||
BAIL_ON_WBC_ERROR(wbc_status);
|
||||
|
||||
groups = (gid_t *)wbcAllocateMemory(
|
||||
sizeof(gid_t), response.data.num_entries, NULL);
|
||||
response.data.num_entries, sizeof(gid_t), NULL);
|
||||
BAIL_ON_PTR_ERROR(groups, wbc_status);
|
||||
|
||||
for (i = 0; i < response.data.num_entries; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user