From 5438b4840dc60b9c026388f405c0795051ed4b67 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 Dec 2013 15:58:02 -0800 Subject: [PATCH] ldb: bad if test in ldb_comparison_fold() Found by David Binderman BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305 Signed-off-by: Jeremy Allison Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Sat Dec 7 11:10:47 CET 2013 on sn-devel-104 --- lib/ldb/common/attrib_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldb/common/attrib_handlers.c b/lib/ldb/common/attrib_handlers.c index daeb422aca3..4b94d392cc6 100644 --- a/lib/ldb/common/attrib_handlers.c +++ b/lib/ldb/common/attrib_handlers.c @@ -254,7 +254,7 @@ int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx, if (n2 == 0 && n1 != 0) { return (int)toupper(*s1); } - if (n2 == 0 && n2 == 0) { + if (n1 == 0 && n2 == 0) { return 0; } return (int)toupper(*s1) - (int)toupper(*s2); -- 2.11.4.GIT