summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn.c3
-rw-r--r--source4/lib/ldb/modules/asq.c3
-rw-r--r--source4/lib/ldb/modules/paged_results.c3
-rw-r--r--source4/lib/ldb/modules/sort.c3
4 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn.c b/source4/dsdb/samdb/ldb_modules/extended_dn.c
index 839c190a8e..9795758dc2 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn.c
@@ -185,6 +185,9 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
}
extended_ctrl = talloc_get_type(control->data, struct ldb_extended_dn_control);
+ if (!extended_ctrl) {
+ return LDB_ERR_PROTOCOL_ERROR;
+ }
/* save it locally and remove it from the list */
if (!save_controls(control, req, &saved_controls)) {
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 905bab480a..2975f4d832 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.c
@@ -105,6 +105,9 @@ static int asq_search(struct ldb_module *module, struct ldb_request *req)
}
asq_ctrl = talloc_get_type(control->data, struct ldb_asq_control);
+ if (!asq_ctrl) {
+ return LDB_ERR_PROTOCOL_ERROR;
+ }
/* get the object to retrieve the DNs to search */
base_req = talloc_zero(req, struct ldb_request);
diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c
index 5e88052990..c4aad4500e 100644
--- a/source4/lib/ldb/modules/paged_results.c
+++ b/source4/lib/ldb/modules/paged_results.c
@@ -117,6 +117,9 @@ static int paged_search(struct ldb_module *module, struct ldb_request *req)
}
paged_ctrl = talloc_get_type(control->data, struct ldb_paged_control);
+ if (!paged_ctrl) {
+ return LDB_ERR_PROTOCOL_ERROR;
+ }
/* check if it is a continuation search the store */
if (paged_ctrl->cookie_len != 0) {
diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c
index 9a0d449cf7..ac9f1081de 100644
--- a/source4/lib/ldb/modules/sort.c
+++ b/source4/lib/ldb/modules/sort.c
@@ -126,6 +126,9 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req
}
sort_ctrls = talloc_get_type(control->data, struct ldb_server_sort_control *);
+ if (!sort_ctrls) {
+ return LDB_ERR_PROTOCOL_ERROR;
+ }
/* FIXME: we do not support more than one attribute for sorting right now */
/* FIXME: we need to check if the attribute type exist or return an error */