mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
e21251926b
If two strings are invalid UTF-8, the string is first compared with memcmp(), which compares as unsigned char. If the strings are of different lengths and one is a substring of the other, the memcmp() returns 0 and a second comparison is made which assumes the next character in the shorter string is '\0' -- but this comparison was done using SIGNED chars (on most systems). That leads to non-transitive comparisons. Consider the strings {"a\xff", "a", "ab\xff"} under that system. "a\xff" < "a", because (char)0xff == -1. "ab\xff" > "a", because 'b' == 98. "ab\xff" < "a\xff", because memcmp("ab\xff", "a\xff", 2) avoiding the signed char tiebreaker. (Before |
||
---|---|---|
.. | ||
addns | ||
afs | ||
async_req | ||
audit_logging | ||
cmdline | ||
compression | ||
crypto | ||
dbwrap | ||
fuzzing | ||
krb5_wrap | ||
ldb | ||
ldb-samba | ||
messaging | ||
mscat | ||
param | ||
printer_driver | ||
pthreadpool | ||
replace | ||
smbconf | ||
socket | ||
talloc | ||
tdb | ||
tdb_wrap | ||
tdr | ||
tevent | ||
texpect | ||
torture | ||
tsocket | ||
util | ||
README | ||
wscript_build |
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