diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2019-02-19 10:25:24 +1300 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-02-26 12:15:12 +0100 |
commit | e71cdbe57b5c86e597f1c007c07c66df652038c5 (patch) | |
tree | d3f925a35654759b0a65436c20cadc06eea9735c | |
parent | 5d6df9adbfd279cc0da7d5cae90cd724b635e97c (diff) | |
download | samba-e71cdbe57b5c86e597f1c007c07c66df652038c5.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>
-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 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; |