summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/paged_results.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/modules/paged_results.c')
-rw-r--r--source4/lib/ldb/modules/paged_results.c3
1 files changed, 3 insertions, 0 deletions
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) {