From 90f7ea6bb58fb31481e158f9b31dfb9e96bd3d54 Mon Sep 17 00:00:00 2001 From: leitner Date: Sat, 16 Sep 2006 19:53:48 +0000 Subject: [PATCH] Fix sizeLimit off-by-one (Marco Reichwald) --- tinyldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyldap.c b/tinyldap.c index 18711a1..6408133 100644 --- a/tinyldap.c +++ b/tinyldap.c @@ -1269,7 +1269,7 @@ found: uint32 j; uint32_unpack(map+indices_offset+4*i,&j); if (ldap_match_mapped(j,&sr)) { - if (sr.sizeLimit && sr.sizeLimit<=++returned) + if (sr.sizeLimit && sr.sizeLimit<++returned) break; answerwith(j,&sr,messageid,out); } @@ -1286,7 +1286,7 @@ found: uint32 j; uint32_unpack(x,&j); if (ldap_match_mapped(x-map,&sr)) { - if (sr.sizeLimit && sr.sizeLimit<=++returned) + if (sr.sizeLimit && sr.sizeLimit<++returned) break; answerwith(x-map,&sr,messageid,out); }