diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-06-22 17:01:02 +1000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-06-24 12:54:18 -0700 |
commit | 1a279f74b72018f0742fc407e0574c9dbd7b7883 (patch) | |
tree | 5fe6ff74d4530a637af621dc2ba5fdf5ec4dbefa /lib/ldb/common/ldb_parse.c | |
parent | 32d0b75afbbd16d7825938089393d8497fda4213 (diff) | |
download | samba-1a279f74b72018f0742fc407e0574c9dbd7b7883.tar.gz samba-1a279f74b72018f0742fc407e0574c9dbd7b7883.tar.bz2 samba-1a279f74b72018f0742fc407e0574c9dbd7b7883.zip |
ldb: Cope with substring match with no chunks in ldb_filter_from_tree
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/ldb/common/ldb_parse.c')
-rw-r--r-- | lib/ldb/common/ldb_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/common/ldb_parse.c b/lib/ldb/common/ldb_parse.c index 33e8444be7..5fa5a74afa 100644 --- a/lib/ldb/common/ldb_parse.c +++ b/lib/ldb/common/ldb_parse.c @@ -748,7 +748,7 @@ char *ldb_filter_from_tree(TALLOC_CTX *mem_ctx, const struct ldb_parse_tree *tre ret = talloc_asprintf(mem_ctx, "(%s=%s", tree->u.substring.attr, tree->u.substring.start_with_wildcard?"*":""); if (ret == NULL) return NULL; - for (i = 0; tree->u.substring.chunks[i]; i++) { + for (i = 0; tree->u.substring.chunks && tree->u.substring.chunks[i]; i++) { s2 = ldb_binary_encode(mem_ctx, *(tree->u.substring.chunks[i])); if (s2 == NULL) { talloc_free(ret); |