1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ldb: bad if test in ldb_comparison_fold()

Found by David Binderman <dcb314@hotmail.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Dec  7 11:10:47 CET 2013 on sn-devel-104
This commit is contained in:
Jeremy Allison 2013-12-06 15:58:02 -08:00 committed by Michael Adam
parent f6ac6f2054
commit 966667abbe

View File

@ -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);