r13580: fix broken client side sort
authorSimo Sorce <idra@samba.org>
Mon, 20 Feb 2006 22:21:21 +0000 (22:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:51:57 +0000 (13:51 -0500)
(This used to be commit cbbc0d7cc4f589235d209011bdb0a0401b492d9e)

source4/lib/ldb/tools/ldbsearch.c

index f96c14f5ec1d13b0112329dba2521bdfdc3b9f82..b4120c0dce0c3575434823df533b9684831c2679 100644 (file)
@@ -97,7 +97,7 @@ static int do_search(struct ldb_context *ldb,
                printf("# returned %d records\n", result->count);
 
                if (options->sorted) {
-                       ldb_qsort(result->msgs, ret, sizeof(struct ldb_message *),
+                       ldb_qsort(result->msgs, result->count, sizeof(struct ldb_message *),
                                  ldb, (ldb_qsort_cmp_fn_t)do_compare_msg);
                }