diff options
author | Howard Chu <hyc@symas.com> | 2013-09-17 22:14:20 -0700 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-09-19 01:42:43 +0200 |
commit | d9bf88dc749cdbc34f70345b156b0117ecf2932b (patch) | |
tree | 39db9d3851c3d5a4c1ed13b7a24592148f8fe8e3 /lib | |
parent | 31ca4fc67443e0c7a8fec61e91df39fe2535982e (diff) | |
download | samba-d9bf88dc749cdbc34f70345b156b0117ecf2932b.tar.gz samba-d9bf88dc749cdbc34f70345b156b0117ecf2932b.tar.bz2 samba-d9bf88dc749cdbc34f70345b156b0117ecf2932b.zip |
Fix SEGV from improperly formed SUBSTRING/PRESENCE filter
Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Simo Sorce <idra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Sep 19 01:42:43 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/ldb_map/ldb_map_outbound.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/ldb_map/ldb_map_outbound.c b/lib/ldb/ldb_map/ldb_map_outbound.c index c6c86e326a..5be5e76515 100644 --- a/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/lib/ldb/ldb_map/ldb_map_outbound.c @@ -848,7 +848,7 @@ int map_subtree_collect_remote_simple(struct ldb_module *module, void *mem_ctx, int i; /* Map value */ (*new)->u.substring.chunks = NULL; - for (i=0; tree->u.substring.chunks[i]; i++) { + for (i=0; tree->u.substring.chunks && tree->u.substring.chunks[i]; i++) { (*new)->u.substring.chunks = talloc_realloc(*new, (*new)->u.substring.chunks, struct ldb_val *, i+2); if (!(*new)->u.substring.chunks) { talloc_free(*new); |