1
0
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:
Volker Lendecke 2010-11-27 19:02:33 +01:00 committed by Volker Lendecke
parent 3b71f5df03
commit a642cb5a92

View File

@ -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++) {