From: Howard Chu Date: Wed, 10 Jan 2007 08:52:07 +0000 (+0000) Subject: ITS#4648, alternate fix X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~213 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1784a54e693d68fc9b9cc1b566aa0880a419d70;p=openldap ITS#4648, alternate fix --- diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index 973e127b3e..6709540885 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -422,6 +422,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 ); @@ -494,9 +498,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 );