×
Close
The permissions on this repository are being updated. This may take a while.
During this time, you or some of the project's contributors may not be able
to push to this repository.
Blame SOURCES/0011-Issue-49188-retrocl-can-crash-server-at-shutdown.patch
Branch: b69e4737bda8636f6cebfba7ae7900fa0e45f859
b69e47
From 8f908a1de1906a0b7451505d9640e2fd2f9fa7eb Mon Sep 17 00:00:00 2001
b69e47
From: Mark Reynolds <mreynolds@redhat.com>
b69e47
Date: Wed, 22 Mar 2017 10:18:13 -0400
b69e47
Subject: [PATCH] Issue 49188 - retrocl can crash server at shutdown
b69e47
b69e47
Description: We do not calloc enough elements when processing nsslapd-attribute
b69e47
from the retrocl plugin configuration. This causes invalid memory
b69e47
to be freed at shutdown(via slapi_ch_array_free).
b69e47
b69e47
https://pagure.io/389-ds-base/issue/49188
b69e47
b69e47
Reviewed by: mreynolds(one line commit rule)
b69e47
---
b69e47
ldap/servers/plugins/retrocl/retrocl.c | 4 ++--
b69e47
1 file changed, 2 insertions(+), 2 deletions(-)
b69e47
b69e47
diff --git a/ldap/servers/plugins/retrocl/retrocl.c b/ldap/servers/plugins/retrocl/retrocl.c
b69e47
index 32b30c7..6e68667 100644
b69e47
--- a/ldap/servers/plugins/retrocl/retrocl.c
b69e47
+++ b/ldap/servers/plugins/retrocl/retrocl.c
b69e47
@@ -470,8 +470,8 @@ static int retrocl_start (Slapi_PBlock *pb)
b69e47
b69e47
retrocl_nattributes = n;
b69e47
b69e47
- retrocl_attributes = (char **)slapi_ch_calloc(n, sizeof(char *));
b69e47
- retrocl_aliases = (char **)slapi_ch_calloc(n, sizeof(char *));
b69e47
+ retrocl_attributes = (char **)slapi_ch_calloc(n + 1, sizeof(char *));
b69e47
+ retrocl_aliases = (char **)slapi_ch_calloc(n + 1, sizeof(char *));
b69e47
b69e47
slapi_log_err(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_start - Attributes:\n");
b69e47
b69e47
--
b69e47
2.9.3
b69e47