mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-13 14:27:59 +08:00
not-so-easy-to-spot bug in filter writing
This commit is contained in:
parent
ef607e65d7
commit
c31596eb78
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user