Blame SOURCES/1013-extdom-fix-wrong-realloc-size.patch
|
|
0201d8 |
From 0e76322666c91affc47387d88260a8774a634eaa Mon Sep 17 00:00:00 2001
|
|
|
0201d8 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
0201d8 |
Date: Wed, 25 Feb 2015 10:28:22 +0100
|
|
|
0201d8 |
Subject: [PATCH] extdom: fix wrong realloc size
|
|
|
0201d8 |
|
|
|
0201d8 |
---
|
|
|
0201d8 |
daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c | 2 +-
|
|
|
0201d8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
0201d8 |
|
|
|
0201d8 |
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
|
|
|
0201d8 |
index 47bcb179f04e08c64d92f55809b84f2d59622344..686128e9bb6994cf442c1cc9ff725657584e17be 100644
|
|
|
0201d8 |
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c
|
|
|
0201d8 |
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_common.c
|
|
|
0201d8 |
@@ -386,7 +386,7 @@ static int get_user_grouplist(const char *name, gid_t gid,
|
|
|
0201d8 |
|
|
|
0201d8 |
ret = getgrouplist(name, gid, groups, &ngroups);
|
|
|
0201d8 |
if (ret == -1) {
|
|
|
0201d8 |
- new_groups = realloc(groups, ngroups);
|
|
|
0201d8 |
+ new_groups = realloc(groups, ngroups * sizeof(gid_t));
|
|
|
0201d8 |
if (new_groups == NULL) {
|
|
|
0201d8 |
free(groups);
|
|
|
0201d8 |
return LDAP_OPERATIONS_ERROR;
|
|
|
0201d8 |
--
|
|
|
0201d8 |
2.1.0
|
|
|
0201d8 |
|