From c1114ef82516002de08e004a930b5ba4a1791b25 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 25 Feb 2015 10:28:22 +0100 Subject: extdom: fix wrong realloc size Reviewed-By: Alexander Bokovoy Reviewed-By: Sumit Bose --- daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemons') diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c index 2c08e56d6..b2e690471 100644 --- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c +++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c @@ -416,7 +416,7 @@ static int get_user_grouplist(const char *name, gid_t gid, ret = getgrouplist(name, gid, groups, &ngroups); if (ret == -1) { - new_groups = realloc(groups, ngroups); + new_groups = realloc(groups, ngroups * sizeof(gid_t)); if (new_groups == NULL) { free(groups); return LDAP_OPERATIONS_ERROR; -- cgit