mirror of
https://github.com/samba-team/samba.git
synced 2025-01-05 09:18:06 +03:00
c49c48afe0
If a non-lowercase ASCII character has an uppercase counterpart in some locale, toupper() will convert it to an int codepoint. Probably that codepoint is too big to fit in our char return type, so we would truncate it to 8 bit. So it becomes an arbitrary mapping. It would also behave strangely with a byte with the top bit set, say 0xE2. If char is unsigned on this system, that is 'â', which uppercases to 'Â', with the codepoint 0xC2. That seems fine in isolation, but remember this is ldb_utf8.c, and that byte was not a codepoint but a piece of a long utf-8 encoding. In the more likely case where char is signed, toupper() is being passed a negative number, the result of which is undefined. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 23 02:37:25 UTC 2024 on atb-devel-224 |
||
---|---|---|
.. | ||
ABI | ||
common | ||
docs | ||
examples | ||
include | ||
ldb_key_value | ||
ldb_ldap | ||
ldb_ldb | ||
ldb_map | ||
ldb_mdb | ||
ldb_sqlite3 | ||
ldb_tdb | ||
man | ||
modules | ||
nssldb | ||
tests | ||
tools | ||
web | ||
_ldb_text.py | ||
Doxyfile | ||
examples.dox | ||
ldb.pc.in | ||
mainpage.dox | ||
pyldb_util.c | ||
pyldb-util.pc.in | ||
pyldb.c | ||
pyldb.h | ||
README_gcov.txt | ||
wscript |