not-so-easy-to-spot bug in filter writing

This commit is contained in:
Pierangelo Masarati 2002-02-14 18:01:15 +00:00
parent ef607e65d7
commit c31596eb78

View File

@ -721,14 +721,15 @@ put_substring_filter( BerElement *ber, char *type, char *val )
if ( *nextstar == '\0' ) {
ftype = LDAP_SUBSTRING_FINAL;
} else if ( gotstar++ == 0 ) {
ftype = LDAP_SUBSTRING_INITIAL;
} else {
ftype = LDAP_SUBSTRING_ANY;
*nextstar++ = '\0';
if ( gotstar++ == 0 ) {
ftype = LDAP_SUBSTRING_INITIAL;
} else {
ftype = LDAP_SUBSTRING_ANY;
}
}
*nextstar++ = '\0';
if ( *val != '\0' || ftype == LDAP_SUBSTRING_ANY ) {
ber_slen_t len = ldap_pvt_filter_value_unescape( val );