mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
55397514db
If strncasecmp_ldb() encounters invalid utf-8 bytes, it compares those as greater than any valid bytes (that is, it sorts them to the end of the list). If an invalid sequence is encountered in both strings at once, the rest of the strings are now compared using the default ldb_comparison_fold rules, as implemented in ldb_comparison_fold_ascii(). That is, each byte is compared individually, [a-z] are translated to [A-Z], and runs of spaces are collapsed into single spaces. There is no perfect answer in this case, but this solution is stable, fine-grained, and probably close to what is expected. This byte-by-byte comparison is equivalent to a utf-8 comparison without case-folding of multibyte codes. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
compression - Various compression algorithms (MSZIP, lzxpress) popt - Command-line option parsing library replace - Provides replacements for standard (POSIX, C99) functions not provided by the host platform. subunit - Utilities and bindings for working with the Subunit test result reporting protocol. talloc - Hierarchical pool based memory allocator tdb - Simple but fast key/value database library, supporting multiple writers torture - Simple unit testing helper library