diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 7aec3efcb8..6753a25df5 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -568,6 +568,10 @@ put_filter( BerElement *ber, char *str ) case '(': str++; parens++; + + /* skip spaces */ + while( isspace( *str ) ) str++; + switch ( *str ) { case '&': Debug( LDAP_DEBUG_TRACE, "put_filter: AND\n",