mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
ldb:attrib_handlers: use ldb_ascii_toupper() in first loop
In a dotless-I locale, we might meet an 'i' before we meet a byte with the high bit set, in which case we still want the ldb casefold comparison. Many ldb operations will do some case-folding before getting here, so hitting this might be quite rare even in those locales. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15637 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
078ecf486a
commit
dca6b2d255
@ -351,8 +351,9 @@ int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx,
|
||||
* never appear in multibyte sequences */
|
||||
if (((unsigned char)s1[0]) & 0x80) goto utf8str;
|
||||
if (((unsigned char)s2[0]) & 0x80) goto utf8str;
|
||||
if (toupper((unsigned char)*s1) != toupper((unsigned char)*s2))
|
||||
if (ldb_ascii_toupper(*s1) != ldb_ascii_toupper(*s2)) {
|
||||
break;
|
||||
}
|
||||
if (*s1 == ' ') {
|
||||
while (n1 > 1 && s1[0] == s1[1]) { s1++; n1--; }
|
||||
while (n2 > 1 && s2[0] == s2[1]) { s2++; n2--; }
|
||||
|
@ -1,2 +0,0 @@
|
||||
^ldb.python.api.tr.api.SearchTests.test_subtree_uniquer_elsewhere.none
|
||||
^ldb.python.api.tr.api.SearchTestsLmdb.test_subtree_uniquer_elsewhere.none
|
Loading…
x
Reference in New Issue
Block a user