summaryrefslogtreecommitdiff
path: root/lib/ldb
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2019-02-19 10:25:24 +1300
committerStefan Metzmacher <metze@samba.org>2019-02-26 07:50:15 +0100
commit754bc1a76e91c265fc1cd69264d013ea60d25392 (patch)
treeebd58f801fbaf3c1bece478bfc001968e72eac14 /lib/ldb
parent33fa01b4be0d70c880a82069cd264c618b981822 (diff)
downloadsamba-754bc1a76e91c265fc1cd69264d013ea60d25392.tar.gz
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero
Initialise the created ldb_parse_tree with talloc_zero, this ensures that it is correctly initialised if inadvertently passed to a function expecting a different operation type. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'lib/ldb')
-rw-r--r--lib/ldb/common/ldb_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/common/ldb_parse.c b/lib/ldb/common/ldb_parse.c
index 5fa5a74afa9..db420091311 100644
--- a/lib/ldb/common/ldb_parse.c
+++ b/lib/ldb/common/ldb_parse.c
@@ -389,7 +389,7 @@ static struct ldb_parse_tree *ldb_parse_simple(TALLOC_CTX *mem_ctx, const char *
struct ldb_parse_tree *ret;
enum ldb_parse_op filtertype;
- ret = talloc(mem_ctx, struct ldb_parse_tree);
+ ret = talloc_zero(mem_ctx, struct ldb_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;