From: Pierangelo Masarati Date: Thu, 17 Nov 2005 18:55:47 +0000 (+0000) Subject: fix size limit count (ITS#4181) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~792 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b2c4a3be6a4603d9d540f92a2ac352360f12755c;p=openldap fix size limit count (ITS#4181) --- diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index dcd349ffa7..2fe00acb2c 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -2305,6 +2305,11 @@ backsql_search( Operation *op, SlapReply *rs ) if ( test_filter( op, e, op->ors_filter ) == LDAP_COMPARE_TRUE ) { + if ( --op->ors_slimit == -1 ) { + rs->sr_err = LDAP_SIZELIMIT_EXCEEDED; + goto send_results; + } + rs->sr_attrs = op->ors_attrs; rs->sr_operational_attrs = NULL; rs->sr_entry = e; @@ -2334,10 +2339,6 @@ next_entry:; } next_entry2:; - if ( --op->ors_slimit == -1 ) { - rs->sr_err = LDAP_SIZELIMIT_EXCEEDED; - goto send_results; - } } end_of_search:;