summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/sort.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-02-15 15:13:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:56 -0500
commit37bd0b655f2483b2a04fa4a53d55abcc7c9705bb (patch)
treefdc750268ff07dace7e0887986f6e33029595f45 /source4/lib/ldb/modules/sort.c
parentf2e88ab7cf2010ffeae2f16762f88285d1a77fd8 (diff)
downloadsamba-37bd0b655f2483b2a04fa4a53d55abcc7c9705bb.tar.gz
samba-37bd0b655f2483b2a04fa4a53d55abcc7c9705bb.tar.bz2
samba-37bd0b655f2483b2a04fa4a53d55abcc7c9705bb.zip
r13507: the 'data' element of LDAP controls is optional.
(prepare the next commit) metze (This used to be commit a1bbf7f2982185cb6cd544b65b4709ab33a850c5)
Diffstat (limited to 'source4/lib/ldb/modules/sort.c')
-rw-r--r--source4/lib/ldb/modules/sort.c3
1 files changed, 3 insertions, 0 deletions
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 */