mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
Fix segfault when sorting LDAP replies on the client.
Andrew Bartlett (This used to be commit c72c39326b263b3aacd178ddc2fc3b1a2906f3d3)
This commit is contained in:
parent
3f7ec9bf19
commit
3dab82394e
@ -241,10 +241,10 @@ again:
|
|||||||
if (sctx->pending)
|
if (sctx->pending)
|
||||||
goto again;
|
goto again;
|
||||||
|
|
||||||
if (sctx->sort && sctx->num_stored != 0) {
|
if (sctx->sort && (sctx->num_stored != 0 || sctx->refs != 0)) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ldb_qsort(sctx->store, ret, sizeof(struct ldb_message *),
|
ldb_qsort(sctx->store, sctx->num_stored, sizeof(struct ldb_message *),
|
||||||
ldb, (ldb_qsort_cmp_fn_t)do_compare_msg);
|
ldb, (ldb_qsort_cmp_fn_t)do_compare_msg);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user