From: Pierangelo Masarati Date: Wed, 23 Nov 2005 08:47:48 +0000 (+0000) Subject: quick fix to ITS#4204 X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~733 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de31e7aa913d47b67211ce4ad13a0607d15d7028;p=openldap quick fix to ITS#4204 --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 4d3409bfc7..f906a02567 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1851,6 +1851,11 @@ pc_cf_gen( ConfigArgs *c ) Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); return( 1 ); } + if ( cm->num_entries_limit >= cm->max_entries ) { + snprintf( c->msg, sizeof( c->msg ), "entry limit (arg #4) must be less than max entries %d (arg #2)", cm->max_entries ); + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); + return( 1 ); + } cm->cc_period = strtol( c->argv[5], &next, 10 ); if ( next == c->argv[5] || next[ 0 ] != '\0' ) {