Blame SOURCES/0083-Ticket-342-better-error-message-when-cache-overflows.patch

cc3dff
From 4730b81cfda96b8825ad0b01df2e89024f31b634 Mon Sep 17 00:00:00 2001
cc3dff
From: Noriko Hosoi <nhosoi@redhat.com>
cc3dff
Date: Thu, 16 Jan 2014 11:06:22 -0800
cc3dff
Subject: [PATCH 83/83] Ticket #342 - better error message when cache overflows
cc3dff
cc3dff
Description: commit 892bf12c1bb8b10afea3d6ff711059bf04e362cc
cc3dff
introduced an invalid memory read/write.  This patch prepares one
cc3dff
extra aclpblock for the acl cache overflow.
cc3dff
cc3dff
https://fedorahosted.org/389/ticket/342
cc3dff
cc3dff
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
cc3dff
(cherry picked from commit 3fee1fc829a4a9573d087d1ead3c949239e5e914)
cc3dff
(cherry picked from commit fe75b11cad371890482b7f394384083dc1b0fd70)
cc3dff
(cherry picked from commit aec20501db3a33df0bc151371cdec334c62af4b0)
cc3dff
---
cc3dff
 ldap/servers/plugins/acl/acl_ext.c | 3 ++-
cc3dff
 1 file changed, 2 insertions(+), 1 deletion(-)
cc3dff
cc3dff
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
cc3dff
index e42a7e2..ee2dd0f 100644
cc3dff
--- a/ldap/servers/plugins/acl/acl_ext.c
cc3dff
+++ b/ldap/servers/plugins/acl/acl_ext.c
cc3dff
@@ -717,7 +717,8 @@ acl__malloc_aclpb ( )
cc3dff
 
cc3dff
     /* allocate arrays for result cache */
cc3dff
     aclpb->aclpb_cache_result = (r_cache_t *)
cc3dff
-            slapi_ch_calloc (aclpb_max_cache_results, sizeof (r_cache_t));
cc3dff
+                slapi_ch_calloc (aclpb_max_cache_results + 1 /* 1 for cache overflow warning */,
cc3dff
+                sizeof (r_cache_t));
cc3dff
 
cc3dff
     /* allocate arrays for target handles in eval_context */
cc3dff
     aclpb->aclpb_curr_entryEval_context.acle_handles_matched_target = (int *)
cc3dff
-- 
cc3dff
1.8.1.4
cc3dff