From bd8712ad36fbf6010d5d5b86b9e3c1190c9cb270 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Fri, 27 Feb 2004 08:16:36 +0000 Subject: [PATCH] Fix for RFC 2696 compliance - avoids infinite loop when talking to Active Directory (which returns no cookie but size in the last paged results - this is permitted). --- clients/tools/ldapsearch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 26dae4ee9c..7d9a453baf 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1594,6 +1594,10 @@ parse_page_control( return EXIT_FAILURE; } + if ( servercookie.bv_len == 0 ) { + morePagedResults = 0; + } + ldap_controls_free( ctrl ); } else { -- 2.39.5