瀏覽代碼

Ticket #342 - better error message when cache overflows

Description: commit 892bf12c1bb8b10afea3d6ff711059bf04e362cc
introduced an invalid memory read/write.  This patch prepares one
extra aclpblock for the acl cache overflow.

https://fedorahosted.org/389/ticket/342

Reviewed by [email protected] (Thank you, Rich!!)
Noriko Hosoi 12 年之前
父節點
當前提交
3fee1fc829
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      ldap/servers/plugins/acl/acl_ext.c

+ 2 - 1
ldap/servers/plugins/acl/acl_ext.c

@@ -742,7 +742,8 @@ acl__malloc_aclpb ( )
 
     /* allocate arrays for result cache */
     aclpb->aclpb_cache_result = (r_cache_t *)
-            slapi_ch_calloc (aclpb_max_cache_results, sizeof (r_cache_t));
+                slapi_ch_calloc (aclpb_max_cache_results + 1 /* 1 for cache overflow warning */,
+                sizeof (r_cache_t));
 
     /* allocate arrays for target handles in eval_context */
     aclpb->aclpb_curr_entryEval_context.acle_handles_matched_target = (int *)