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 07:51:11 +0100 |
commit | da12e534efe2c80dc394295315a9a34ac72a2e9f (patch) | |
tree | c9177201fd3f75bad717e3680c439a5ee0b4d56d /lib | |
parent | 699e2aa19946d43b162355dcb299a1dd798c9cd7 (diff) | |
download | samba-da12e534efe2c80dc394295315a9a34ac72a2e9f.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')
-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; |