summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-10-20 17:29:29 +0200
committerJeremy Allison <jra@samba.org>2013-10-22 03:28:20 +0200
commit4e06c61b41fdde21fafaeee3c4fb3366744de9d9 (patch)
tree85c60689a97af2e1240c1f7b145d5c57d6a92e05
parent71c8cd19cf079c7e1462a9ca4432725e3623f7cd (diff)
downloadsamba-4e06c61b41fdde21fafaeee3c4fb3366744de9d9.tar.gz
samba-4e06c61b41fdde21fafaeee3c4fb3366744de9d9.tar.bz2
samba-4e06c61b41fdde21fafaeee3c4fb3366744de9d9.zip
ldb: Fix CID 240798 Uninitialized pointer read
Not called right now, because nobody tries multiple sort attributes. But if someone did, build_response would have looked at the uninitialized controls. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 22 03:28:20 CEST 2013 on sn-devel-104
-rw-r--r--lib/ldb/modules/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/modules/sort.c b/lib/ldb/modules/sort.c
index c6fce2d96e..1b762f7e51 100644
--- a/lib/ldb/modules/sort.c
+++ b/lib/ldb/modules/sort.c
@@ -252,7 +252,6 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req
struct ldb_control *control;
struct ldb_server_sort_control **sort_ctrls;
struct ldb_control **saved_controls;
- struct ldb_control **controls;
struct ldb_request *down_req;
struct sort_context *ac;
struct ldb_context *ldb;
@@ -286,6 +285,7 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req
if (sort_ctrls[1] != NULL) {
if (control->critical) {
+ struct ldb_control **controls = NULL;
/* callback immediately */
ret = build_response(req, &controls,