From: Howard Chu Date: Wed, 10 Jan 2007 10:22:18 +0000 (+0000) Subject: ITS#4648 ffrom HEAD X-Git-Tag: OPENLDAP_REL_ENG_2_3_33~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4845ef2370d052c821724734b3438f7556b6c823;p=thirdparty%2Fopenldap.git ITS#4648 ffrom HEAD --- diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index 261740c093..fbfe90ced6 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -425,6 +425,10 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in ) parens--; break; + case '(': + rc = -1; + goto done; + default: Debug( LDAP_DEBUG_TRACE, "put_filter: simple\n", 0, 0, 0 ); @@ -497,9 +501,11 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in ) str = next; break; } + if ( !parens ) + break; } - rc = parens ? -1 : 0; + rc = ( parens || *str ) ? -1 : 0; done: LDAP_FREE( freeme );