From: Douglas Bagnall Date: Fri, 3 May 2019 04:56:14 +0000 (+1200) Subject: dsdb/modules/acl: avoid deref of missing data (CID 1107200) X-Git-Tag: tdb-1.4.1~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ad8f9baf00fd7230ba6a47765a287ad2521d51c;p=thirdparty%2Fsamba.git dsdb/modules/acl: avoid deref of missing data (CID 1107200) Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer --- diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c index 5d36f85b173..b1bbf936006 100644 --- a/source4/dsdb/samdb/ldb_modules/acl.c +++ b/source4/dsdb/samdb/ldb_modules/acl.c @@ -2170,9 +2170,11 @@ static int acl_search(struct ldb_module *module, struct ldb_request *req) } data = talloc_get_type(ldb_module_get_private(ac->module), struct acl_private); - if (data != NULL) { - ac->userPassword = data->userPassword_support; + if (data == NULL) { + return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR, + "acl_private data is missing"); } + ac->userPassword = data->userPassword_support; ret = acl_search_update_confidential_attrs(ac, data); if (ret != LDB_SUCCESS) {