33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
|
From 8d34d172092f71baad0d777567e49aebfa07313d Mon Sep 17 00:00:00 2001
|
||
|
|
From: Gary Lockyer <gary@catalyst.net.nz>
|
||
|
|
Date: Tue, 19 Feb 2019 10:25:24 +1300
|
||
|
|
Subject: [PATCH] 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>
|
||
|
|
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
||
|
|
---
|
||
|
|
lib/ldb/common/ldb_parse.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
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;
|
||
|
|
--
|
||
|
|
2.24.0
|