]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#4648 ffrom HEAD
authorHoward Chu <hyc@openldap.org>
Wed, 10 Jan 2007 10:22:18 +0000 (10:22 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 10 Jan 2007 10:22:18 +0000 (10:22 +0000)
libraries/libldap/filter.c

index 261740c09362b217c95e0e2cd413fd2a36ec9056..fbfe90ced66244c177c956d95a5f5bd329090c47 100644 (file)
@@ -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 );