svn commit: samba r14431 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

tridge at samba.org tridge at samba.org
Wed Mar 15 05:50:43 GMT 2006


Author: tridge
Date: 2006-03-15 05:50:42 +0000 (Wed, 15 Mar 2006)
New Revision: 14431

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14431

Log:

don't call qsort with a null array



Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2006-03-15 05:50:15 UTC (rev 14430)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2006-03-15 05:50:42 UTC (rev 14431)
@@ -241,7 +241,9 @@
 
 	talloc_free(msg);
 
-	qsort(list->dn, list->count, sizeof(char *), (comparison_fn_t) list_cmp);
+	if (list->count > 1) {
+		qsort(list->dn, list->count, sizeof(char *), (comparison_fn_t) list_cmp);
+	}
 
 	return 1;
 }



More information about the samba-cvs mailing list