1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

libcli/ldap: Cope with substring match with no chunks in ldap_push_filter

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andrew Bartlett 2013-06-22 17:01:42 +10:00 committed by Jeremy Allison
parent 4ca9639269
commit 70cb7fd214

View File

@ -269,8 +269,10 @@ static bool ldap_push_filter(struct asn1_data *data, struct ldb_parse_tree *tree
asn1_push_tag(data, ASN1_CONTEXT(4));
asn1_write_OctetString(data, tree->u.substring.attr, strlen(tree->u.substring.attr));
asn1_push_tag(data, ASN1_SEQUENCE(0));
if (tree->u.substring.chunks && tree->u.substring.chunks[0]) {
i = 0;
if ( ! tree->u.substring.start_with_wildcard) {
if (!tree->u.substring.start_with_wildcard) {
asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(0));
asn1_write_DATA_BLOB_LDAPString(data, tree->u.substring.chunks[i]);
asn1_pop_tag(data);
@ -290,6 +292,7 @@ static bool ldap_push_filter(struct asn1_data *data, struct ldb_parse_tree *tree
asn1_pop_tag(data);
i++;
}
}
asn1_pop_tag(data);
asn1_pop_tag(data);
break;